Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class FastObjectOutput extends Object implements ObjectOutput
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
unwrap()
Unwraps the object output.
|
static FastObjectOutput |
wrap(ObjectOutput out)
Gets the wrapper for the provided ObjectOutput, creating if needed.
|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
protected void |
writeFastObject(FastExternalizable obj)
Writes a fast externalizable object to the provided stream, supporting null values.
|
void |
writeFastUTF(String value)
Writes a string to the output, not writing any duplicates.
|
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(Object obj)
Writes the provided object in the most efficient manner possible, with no object graph tracking (if possible).
|
void |
writeShort(int v) |
void |
writeUTF(String s) |
public static FastObjectOutput wrap(ObjectOutput out) throws IOException
IOExceptionpublic void unwrap()
throws IOException
IOExceptionpublic void writeObject(Object obj) throws IOException
NULL.
If the object is not FastSerializable, writes STANDARD and then uses standard Java serialization.
Otherwise, calls writeFastObject(FastSerializable).
This allows individual objects to switch between FastExternalizable and standard serialization without calling
code needing to know the difference.writeObject in interface ObjectOutputIOException#readObjectprotected void writeFastObject(FastExternalizable obj) throws IOException
IOException#readFastObjectpublic void writeFastUTF(String value) throws IOException
IOExceptionpublic void write(int b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void flush()
throws IOException
flush in interface ObjectOutputIOExceptionpublic void close()
throws IOException
close in interface ObjectOutputclose in interface AutoCloseableIOExceptionpublic 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 writeBytes(String s) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF in interface DataOutputIOExceptionCopyright © 2000–2016 AO Industries, Inc.. All rights reserved.