Class SafeObjectInputStream
- java.lang.Object
-
- org.apache.axis2.context.externalize.SafeObjectInputStream
-
- All Implemented Interfaces:
DataInput,ObjectInput,ObjectStreamConstants,AutoCloseable
public class SafeObjectInputStream extends Object implements ObjectInput, ObjectStreamConstants
A SafeObjectInputStream reads data that was written by SafeObjectOutputStream- See Also:
SafeObjectInput
-
-
Field Summary
-
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, SERIAL_FILTER_PERMISSION, 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()static SafeObjectInputStreaminstall(ObjectInput in)Add the SafeObjectInputStream if necessaryintread()intread(byte[] b)intread(byte[] b, int off, int len)ArrayListreadArrayList()Read the input stream and place objects in an ArrayListbooleanreadBoolean()bytereadByte()charreadChar()doublereadDouble()floatreadFloat()voidreadFully(byte[] b)voidreadFully(byte[] b, int off, int len)HashMapreadHashMap()Read the input stream and place the key/value pairs in a hashmapintreadInt()StringreadLine()LinkedListreadLinkedList()Read the input stream and place objects in a LinkedListListreadList(List list)Read hte input stream and place objects in the specified ListlongreadLong()MapreadMap(Map map)Read the input stream and place the key/value pairs in the indicated MapObjectreadObject()shortreadShort()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()longskip(long n)intskipBytes(int n)
-
-
-
Method Detail
-
install
public static SafeObjectInputStream install(ObjectInput in)
Add the SafeObjectInputStream if necessary- Parameters:
in-- Returns:
-
available
public int available() throws IOException- Specified by:
availablein interfaceObjectInput- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceObjectInput- Throws:
IOException
-
read
public int read() throws IOException- Specified by:
readin interfaceObjectInput- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Specified by:
readin interfaceObjectInput- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Specified by:
readin interfaceObjectInput- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
public byte readByte() throws IOException- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readChar
public char readChar() throws IOException- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readDouble
public double readDouble() throws IOException- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readFloat
public float readFloat() throws IOException- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws IOException- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
public void readFully(byte[] b) throws IOException- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readInt
public int readInt() throws IOException- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readLong
public long readLong() throws IOException- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readObject
public Object readObject() throws ClassNotFoundException, IOException
- Specified by:
readObjectin interfaceObjectInput- Throws:
ClassNotFoundExceptionIOException
-
readShort
public short readShort() throws IOException- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Specified by:
skipin interfaceObjectInput- Throws:
IOException
-
skipBytes
public int skipBytes(int n) throws IOException- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readHashMap
public HashMap readHashMap() throws IOException
Read the input stream and place the key/value pairs in a hashmap- Returns:
- HashMap or null
- Throws:
IOException
-
readMap
public Map readMap(Map map) throws IOException
Read the input stream and place the key/value pairs in the indicated Map- Parameters:
map- input map- Returns:
- map or null
- Throws:
IOException
-
readArrayList
public ArrayList readArrayList() throws IOException
Read the input stream and place objects in an ArrayList- Returns:
- ArrayList or null
- Throws:
IOException
-
readLinkedList
public LinkedList readLinkedList() throws IOException
Read the input stream and place objects in a LinkedList- Returns:
- LinkedList or null
- Throws:
IOException
-
readList
public List readList(List list) throws IOException
Read hte input stream and place objects in the specified List- Parameters:
list- List- Returns:
- List or null
- Throws:
IOException
-
-