|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.export.Exporter
com.threerings.export.BinaryExporter
public class BinaryExporter
Exports to a compact binary format.
| Field Summary | |
|---|---|
static Class<?>[] |
BOOTSTRAP_CLASSES
We seed the class map with these class references. |
static byte |
COLLECTION_CLASS_FLAG
Indicates that a stored class is a (non- Exportable) collection. |
static short |
COMPRESSED_FORMAT_FLAG
The compressed format flag. |
static byte |
FINAL_CLASS_FLAG
Indicates that a stored class is final. |
static byte |
INNER_CLASS_FLAG
Indicates that a stored class is a non-static inner class. |
static int |
MAGIC_NUMBER
Identifies the file type. |
static byte |
MAP_CLASS_FLAG
Indicates that the stored class is a (non- Exportable) map. |
static short |
VERSION
The format version. |
| Constructor Summary | |
|---|---|
BinaryExporter(OutputStream out)
Creates an exporter to write to the specified stream with compression. |
|
BinaryExporter(OutputStream out,
boolean compress)
Creates an exporter to write to the specified stream. |
|
| Method Summary | ||
|---|---|---|
void |
close()
Writes out any remaining data and closes the underlying stream. |
|
void |
finish()
Writes out any remaining data without closing the underlying stream. |
|
void |
write(String name,
boolean value)
Associates a boolean value with the current object. |
|
void |
write(String name,
byte value)
Associates a byte value with the current object. |
|
void |
write(String name,
char value)
Associates a character value with the current object. |
|
void |
write(String name,
double value)
Associates a double value with the current object. |
|
void |
write(String name,
float value)
Associates a float value with the current object. |
|
void |
write(String name,
int value)
Associates an integer value with the current object. |
|
void |
write(String name,
long value)
Associates a long value with the current object. |
|
void |
write(String name,
short value)
Associates a short value with the current object. |
|
|
write(String name,
T value,
Class<T> clazz)
Associates an object value with the current object. |
|
void |
writeObject(Object object)
Writes the object to the underlying stream. |
|
| Methods inherited from class com.threerings.export.Exporter |
|---|
defaultWriteFields, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAGIC_NUMBER
public static final short VERSION
public static final short COMPRESSED_FORMAT_FLAG
public static final byte FINAL_CLASS_FLAG
public static final byte INNER_CLASS_FLAG
public static final byte COLLECTION_CLASS_FLAG
Exportable) collection.
public static final byte MAP_CLASS_FLAG
Exportable) map.
public static final Class<?>[] BOOTSTRAP_CLASSES
| Constructor Detail |
|---|
public BinaryExporter(OutputStream out)
public BinaryExporter(OutputStream out,
boolean compress)
compress - if true, compress the output.| Method Detail |
|---|
public void writeObject(Object object)
throws IOException
Exporter
writeObject in class ExporterIOException
public void write(String name,
boolean value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
byte value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
char value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
double value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
float value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
int value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
long value)
throws IOException
Exporter
write in class ExporterIOException
public void write(String name,
short value)
throws IOException
Exporter
write in class ExporterIOException
public <T> void write(String name,
T value,
Class<T> clazz)
throws IOException
Exporter
write in class ExporterIOException
public void close()
throws IOException
Exporter
close in interface Closeableclose in class ExporterIOException
public void finish()
throws IOException
Exporter
finish in class ExporterIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||