public class SafeObjectOutputStream extends Object implements ObjectOutput, ObjectStreamConstants, ExternalizeConstants
SafeObjectInputStream| Modifier and Type | Field and Description |
|---|---|
static Hashtable |
notSerializableList |
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRINGACTIVE_OBJECT, EMPTY_MARKER, EMPTY_OBJECT, LAST_ENTRY, OBJ_RESTORE_PROBLEM, OBJ_SAVE_PROBLEM, UNSUPPORTED_REVID, UNSUPPORTED_SUID| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
defaultWriteObject() |
boolean |
equals(Object o) |
void |
flush() |
int |
hashCode() |
static SafeObjectOutputStream |
install(ObjectOutput out)
Add the SafeOutputStream if necessary.
|
ObjectOutputStream.PutField |
putFields() |
void |
reset() |
String |
toString() |
void |
useProtocolVersion(int version) |
void |
write(byte[] buf) |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int val) |
void |
writeBoolean(boolean val) |
void |
writeByte(int val) |
void |
writeBytes(String str) |
void |
writeChar(int val) |
void |
writeChars(String str) |
void |
writeDouble(double val) |
void |
writeFields() |
void |
writeFloat(float val) |
void |
writeInt(int val) |
boolean |
writeItem(Object obj,
boolean isSafe)
Writes pair of objects to the stream.
|
boolean |
writeList(List al)
Write a list.
|
void |
writeLong(long val) |
boolean |
writeMap(Map map)
Write a map
FORMAT for null map
EMPTY_OBJECT
FORMAT for non-empty map
ACTIVE_OBJECT
for each contained key value pair
writePair
EMPTY_OBJECT (indicates end of the list
|
void |
writeObject(Object obj) |
boolean |
writePair(Object obj1,
boolean isSafe1,
Object obj2,
boolean isSafe2)
Writes pair of objects to the stream.
|
void |
writeShort(int val) |
void |
writeUTF(String str) |
public static final Hashtable notSerializableList
public static SafeObjectOutputStream install(ObjectOutput out) throws IOException
out - Current ObjectOutputIOExceptionpublic void close()
throws IOException
close in interface ObjectOutputclose in interface AutoCloseableIOExceptionpublic void defaultWriteObject()
throws IOException
IOExceptionpublic void flush()
throws IOException
flush in interface ObjectOutputIOExceptionpublic ObjectOutputStream.PutField putFields() throws IOException
IOExceptionpublic void reset()
throws IOException
IOExceptionpublic void useProtocolVersion(int version)
throws IOException
IOExceptionpublic void write(byte[] buf,
int off,
int len)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] buf)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(int val)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void writeBoolean(boolean val)
throws IOException
writeBoolean in interface DataOutputIOExceptionpublic void writeByte(int val)
throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeBytes(String str) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChar(int val)
throws IOException
writeChar in interface DataOutputIOExceptionpublic void writeChars(String str) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeDouble(double val)
throws IOException
writeDouble in interface DataOutputIOExceptionpublic void writeFields()
throws IOException
IOExceptionpublic void writeFloat(float val)
throws IOException
writeFloat in interface DataOutputIOExceptionpublic void writeInt(int val)
throws IOException
writeInt in interface DataOutputIOExceptionpublic void writeLong(long val)
throws IOException
writeLong in interface DataOutputIOExceptionpublic void writeObject(Object obj) throws IOException
writeObject in interface ObjectOutputIOExceptionpublic void writeShort(int val)
throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeUTF(String str) throws IOException
writeUTF in interface DataOutputIOExceptionpublic boolean writeMap(Map map) throws IOException
ll - IOExceptionpublic boolean writeList(List al) throws IOException
ll - IOExceptionpublic boolean writePair(Object obj1, boolean isSafe1, Object obj2, boolean isSafe2) throws IOException
obj1 - isSafe1 - true if you know that object can be safely serialized. false if the
object needs to be tested for serialization.obj2 - isSafe2 - true if you know that object can be safely serialized. false if the
object needs to be tested for serialization.IOExceptionpublic boolean writeItem(Object obj, boolean isSafe) throws IOException
obj1 - isSafe1 - true if you know that object can be safely serialized. false if the
object needs to be tested for serialization.obj2 - isSafe2 - true if you know that object can be safely serialized. false if the
object needs to be tested for serialization.IOExceptionCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.