|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.context.externalize.SafeObjectOutputStream
public class SafeObjectOutputStream
A SafeObjectOutputStream provides extra mechanisms to ensure that objects can be safely serialized to the ObjectOutput. If an Object is written to a normal ObjectOutput, the ObjectOutput is left in an unknown state if a NotSerializableException occurs. The SafeObjectOutputStream does some additonal checking to ensure that the Object can be safely written. If the Object is suspicious, it is first written to a buffer to ensure that the underlying ObjectOutput is not corrupted. In addition, SafeObjectOutputStream provides extra methods to write containers of Objects. For example the writeMap object will write the key and value pairs that are can be serialized.
SafeObjectInputStream
Field Summary | |
---|---|
static java.util.Hashtable |
notSerializableList
|
Fields inherited from interface java.io.ObjectStreamConstants |
---|
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_STRING |
Fields inherited from interface org.apache.axis2.context.externalize.ExternalizeConstants |
---|
ACTIVE_OBJECT, EMPTY_MARKER, EMPTY_OBJECT, LAST_ENTRY, OBJ_RESTORE_PROBLEM, OBJ_SAVE_PROBLEM, UNSUPPORTED_REVID, UNSUPPORTED_SUID |
Method Summary | |
---|---|
void |
close()
|
void |
defaultWriteObject()
|
boolean |
equals(java.lang.Object o)
|
void |
flush()
|
int |
hashCode()
|
static SafeObjectOutputStream |
install(java.io.ObjectOutput out)
Add the SafeOutputStream if necessary. |
java.io.ObjectOutputStream.PutField |
putFields()
|
void |
reset()
|
java.lang.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(java.lang.String str)
|
void |
writeChar(int val)
|
void |
writeChars(java.lang.String str)
|
void |
writeDouble(double val)
|
void |
writeFields()
|
void |
writeFloat(float val)
|
void |
writeInt(int val)
|
boolean |
writeItem(java.lang.Object obj,
boolean isSafe)
Writes pair of objects to the stream. |
boolean |
writeList(java.util.List al)
Write a list. |
void |
writeLong(long val)
|
boolean |
writeMap(java.util.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(java.lang.Object obj)
|
boolean |
writePair(java.lang.Object obj1,
boolean isSafe1,
java.lang.Object obj2,
boolean isSafe2)
Writes pair of objects to the stream. |
void |
writeShort(int val)
|
void |
writeUTF(java.lang.String str)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Hashtable notSerializableList
Method Detail |
---|
public static SafeObjectOutputStream install(java.io.ObjectOutput out) throws java.io.IOException
out
- Current ObjectOutput
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.ObjectOutput
java.io.IOException
public void defaultWriteObject() throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void flush() throws java.io.IOException
flush
in interface java.io.ObjectOutput
java.io.IOException
public int hashCode()
hashCode
in class java.lang.Object
public java.io.ObjectOutputStream.PutField putFields() throws java.io.IOException
java.io.IOException
public void reset() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void useProtocolVersion(int version) throws java.io.IOException
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void write(byte[] buf) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void write(int val) throws java.io.IOException
write
in interface java.io.DataOutput
write
in interface java.io.ObjectOutput
java.io.IOException
public void writeBoolean(boolean val) throws java.io.IOException
writeBoolean
in interface java.io.DataOutput
java.io.IOException
public void writeByte(int val) throws java.io.IOException
writeByte
in interface java.io.DataOutput
java.io.IOException
public void writeBytes(java.lang.String str) throws java.io.IOException
writeBytes
in interface java.io.DataOutput
java.io.IOException
public void writeChar(int val) throws java.io.IOException
writeChar
in interface java.io.DataOutput
java.io.IOException
public void writeChars(java.lang.String str) throws java.io.IOException
writeChars
in interface java.io.DataOutput
java.io.IOException
public void writeDouble(double val) throws java.io.IOException
writeDouble
in interface java.io.DataOutput
java.io.IOException
public void writeFields() throws java.io.IOException
java.io.IOException
public void writeFloat(float val) throws java.io.IOException
writeFloat
in interface java.io.DataOutput
java.io.IOException
public void writeInt(int val) throws java.io.IOException
writeInt
in interface java.io.DataOutput
java.io.IOException
public void writeLong(long val) throws java.io.IOException
writeLong
in interface java.io.DataOutput
java.io.IOException
public void writeObject(java.lang.Object obj) throws java.io.IOException
writeObject
in interface java.io.ObjectOutput
java.io.IOException
public void writeShort(int val) throws java.io.IOException
writeShort
in interface java.io.DataOutput
java.io.IOException
public void writeUTF(java.lang.String str) throws java.io.IOException
writeUTF
in interface java.io.DataOutput
java.io.IOException
public boolean writeMap(java.util.Map map) throws java.io.IOException
ll
-
java.io.IOException
public boolean writeList(java.util.List al) throws java.io.IOException
ll
-
java.io.IOException
public boolean writePair(java.lang.Object obj1, boolean isSafe1, java.lang.Object obj2, boolean isSafe2) throws java.io.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.
java.io.IOException
public boolean writeItem(java.lang.Object obj, boolean isSafe) throws java.io.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.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |