public class JMFSerializer extends Object implements OutputContext
| Modifier and Type | Field and Description |
|---|---|
protected CodecRegistry |
codecRegistry |
protected SharedContext |
context |
protected OutputStream |
outputStream |
protected Map<Object,Integer> |
storedObjects |
protected Map<String,Integer> |
storedStrings |
CLIENT_PERSISTENCE_COLLECTION_PACKAGE, JMF_1111_1010, JMF_1111_1011, JMF_1111_1100, JMF_1111_1101, JMF_1111_1110, JMF_1111_1111, JMF_ARRAY, JMF_ARRAY_LIST, JMF_BIG_DECIMAL, JMF_BIG_INTEGER, JMF_BOOLEAN, JMF_BOOLEAN_OBJECT, JMF_BYTE, JMF_BYTE_OBJECT, JMF_CHARACTER, JMF_CHARACTER_OBJECT, JMF_CLASS, JMF_DATE, JMF_DOUBLE, JMF_DOUBLE_OBJECT, JMF_ENUM, JMF_FLOAT, JMF_FLOAT_OBJECT, JMF_HASH_MAP, JMF_HASH_SET, JMF_INTEGER, JMF_INTEGER_OBJECT, JMF_LONG, JMF_LONG_OBJECT, JMF_NULL, JMF_OBJECT, JMF_OBJECT_END, JMF_SHORT, JMF_SHORT_OBJECT, JMF_SQL_DATE, JMF_SQL_TIME, JMF_SQL_TIMESTAMP, JMF_STRING, JMF_X011_1100, JMF_X011_1101, JMF_X011_1110, JMF_X011_1111, JMF_XX01_1110, JMF_XX01_1111, JMF_XXX0_1101, JMF_XXX0_1110, JMF_XXX0_1111, JMF_XXXX_0111, UTF8| Constructor and Description |
|---|
JMFSerializer(OutputStream outputStream,
SharedContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToStoredObjects(Object o) |
void |
addToStoredStrings(String s) |
void |
close() |
void |
flush() |
String |
getAlias(String className) |
void |
getAndWriteProperty(Object obj,
Property property) |
OutputStream |
getOutputStream() |
Reflection |
getReflection()
Return the
Reflection registered in the global JMF SharedContext. |
SharedContext |
getSharedContext() |
int |
indexOfStoredObjects(Object o) |
int |
indexOfStoredStrings(String s) |
void |
write(byte[] b)
Deprecated.
|
void |
write(byte[] b,
int off,
int len)
Deprecated.
|
void |
write(int b)
Deprecated.
|
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s)
Deprecated.
|
void |
writeChar(int v) |
void |
writeChars(String s)
Deprecated.
|
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(Object obj) |
void |
writeShort(int v) |
void |
writeUTF(String s) |
protected final Map<String,Integer> storedStrings
protected final Map<Object,Integer> storedObjects
protected final OutputStream outputStream
protected final SharedContext context
protected final CodecRegistry codecRegistry
public JMFSerializer(OutputStream outputStream, SharedContext context)
public void writeBoolean(boolean v) throws IOException
writeBoolean in interface DataOutputIOExceptionpublic void writeByte(int v) throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeShort(int v) throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeChar(int v) throws IOException
writeChar in interface DataOutputIOExceptionpublic void writeInt(int v) throws IOException
writeInt in interface DataOutputIOExceptionpublic void writeLong(long v) throws IOException
writeLong in interface DataOutputIOExceptionpublic void writeFloat(float v) throws IOException
writeFloat in interface DataOutputIOExceptionpublic void writeDouble(double v) throws IOException
writeDouble in interface DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF in interface DataOutputIOExceptionpublic void writeObject(Object obj) throws IOException
writeObject in interface ObjectOutputIOExceptionpublic void flush() throws IOException
flush in interface ObjectOutputIOExceptionpublic void close() throws IOException
close in interface ObjectOutputclose in interface AutoCloseableIOException@Deprecated public void write(int b) throws IOException
write in interface DataOutputwrite in interface ObjectOutputwrite in interface ExtendedObjectOutputIOException@Deprecated public void write(byte[] b) throws IOException
write in interface DataOutputwrite in interface ObjectOutputwrite in interface ExtendedObjectOutputIOException@Deprecated public void write(byte[] b, int off, int len) throws IOException
write in interface DataOutputwrite in interface ObjectOutputwrite in interface ExtendedObjectOutputIOException@Deprecated public void writeBytes(String s) throws IOException
writeBytes in interface DataOutputwriteBytes in interface ExtendedObjectOutputIOException@Deprecated public void writeChars(String s) throws IOException
writeChars in interface DataOutputwriteChars in interface ExtendedObjectOutputIOExceptionpublic SharedContext getSharedContext()
getSharedContext in interface OutputContextpublic OutputStream getOutputStream()
getOutputStream in interface OutputContextpublic void addToStoredStrings(String s)
addToStoredStrings in interface OutputContextpublic int indexOfStoredStrings(String s)
indexOfStoredStrings in interface OutputContextpublic void addToStoredObjects(Object o)
addToStoredObjects in interface OutputContextpublic int indexOfStoredObjects(Object o)
indexOfStoredObjects in interface OutputContextpublic Reflection getReflection()
ExtendedObjectOutputReflection registered in the global JMF SharedContext.getReflection in interface ExtendedObjectOutputpublic String getAlias(String className)
getAlias in interface ExtendedObjectOutputpublic void getAndWriteProperty(Object obj, Property property) throws IOException, IllegalAccessException, InvocationTargetException
getAndWriteProperty in interface ExtendedObjectOutputIOExceptionIllegalAccessExceptionInvocationTargetException