Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class NativeFormat
- Object
- NativeFormat
The
.cn1gfx container: a ZIP holding document.json and every raster as a PNG under
images/. It keeps everything an ArtDocument holds – every node, paint, stroke, effect
parameter and note – so a document saved and read back is the same document.Methods
public static void write(ArtDocument doc, OutputStream out)
throws IOException | Writes a document. |
public static ArtDocument read(InputStream in)
throws IOException | Reads a document. |
Inherited methods
Method details
write
public static void write(ArtDocument doc, OutputStream out)
throws IOExceptionWrites a document.
Parameters
docArtDocument- the document
outOutputStream- receives the file; not closed
Throws
read
public static ArtDocument read(InputStream in)
throws IOExceptionReads a document.
Parameters
inInputStream- the file; read to its end, not closed