org.apache.axis2.context.externalize
Class SafeObjectInputStream

java.lang.Object
  extended by org.apache.axis2.context.externalize.SafeObjectInputStream
All Implemented Interfaces:
DataInput, ObjectInput, ObjectStreamConstants

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, 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
 int available()
           
 void close()
           
static SafeObjectInputStream install(ObjectInput in)
          Add the SafeObjectInputStream if necessary
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 ArrayList readArrayList()
          Read the input stream and place objects in an ArrayList
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 HashMap readHashMap()
          Read the input stream and place the key/value pairs in a hashmap
 int readInt()
           
 String readLine()
           
 LinkedList readLinkedList()
          Read the input stream and place objects in a LinkedList
 List readList(List list)
          Read hte input stream and place objects in the specified List
 long readLong()
           
 Map readMap(Map map)
          Read the input stream and place the key/value pairs in the indicated Map
 Object readObject()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 String readUTF()
           
 long skip(long n)
           
 int skipBytes(int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
available in interface ObjectInput
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface ObjectInput
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in interface ObjectInput
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Specified by:
read in interface ObjectInput
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Specified by:
read in interface ObjectInput
Throws:
IOException

readBoolean

public boolean readBoolean()
                    throws IOException
Specified by:
readBoolean in interface DataInput
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Specified by:
readByte in interface DataInput
Throws:
IOException

readChar

public char readChar()
              throws IOException
Specified by:
readChar in interface DataInput
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Specified by:
readDouble in interface DataInput
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Specified by:
readFloat in interface DataInput
Throws:
IOException

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

readFully

public void readFully(byte[] b)
               throws IOException
Specified by:
readFully in interface DataInput
Throws:
IOException

readInt

public int readInt()
            throws IOException
Specified by:
readInt in interface DataInput
Throws:
IOException

readLine

public String readLine()
                throws IOException
Specified by:
readLine in interface DataInput
Throws:
IOException

readLong

public long readLong()
              throws IOException
Specified by:
readLong in interface DataInput
Throws:
IOException

readObject

public Object readObject()
                  throws ClassNotFoundException,
                         IOException
Specified by:
readObject in interface ObjectInput
Throws:
ClassNotFoundException
IOException

readShort

public short readShort()
                throws IOException
Specified by:
readShort in interface DataInput
Throws:
IOException

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Specified by:
readUnsignedByte in interface DataInput
Throws:
IOException

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Specified by:
readUnsignedShort in interface DataInput
Throws:
IOException

readUTF

public String readUTF()
               throws IOException
Specified by:
readUTF in interface DataInput
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Specified by:
skip in interface ObjectInput
Throws:
IOException

skipBytes

public int skipBytes(int n)
              throws IOException
Specified by:
skipBytes in interface DataInput
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
See Also:
SafeObjectOutputStream.writeMap()

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
See Also:
SafeObjectOutputStream.writeMap()

readArrayList

public ArrayList readArrayList()
                        throws IOException
Read the input stream and place objects in an ArrayList

Returns:
ArrayList or null
Throws:
IOException
See Also:
SafeObjectInputStream.writeList()

readLinkedList

public LinkedList readLinkedList()
                          throws IOException
Read the input stream and place objects in a LinkedList

Returns:
LinkedList or null
Throws:
IOException
See Also:
SafeObjectInputStream.writeList()

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
See Also:
SafeObjectInputStream.writeList()


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.