Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class NativeFormat

  1. Object
  2. 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 IOExceptionWrites a document.
public static ArtDocument read(InputStream in) throws IOExceptionReads a document.

Inherited methods

Method details

write

public static void write(ArtDocument doc, OutputStream out) throws IOException
Writes a document.

Parameters

doc ArtDocument
the document
out OutputStream
receives the file; not closed

read

public static ArtDocument read(InputStream in) throws IOException
Reads a document.

Parameters

in InputStream
the file; read to its end, not closed