45 |
* <code>InputStream</code> |
* <code>InputStream</code> |
46 |
* |
* |
47 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
48 |
|
* |
49 |
|
* @see DataInput |
50 |
*/ |
*/ |
51 |
public interface ObjectInput extends DataInput |
public interface ObjectInput extends DataInput |
52 |
{ |
{ |
62 |
|
|
63 |
/** |
/** |
64 |
* This method reading a byte of data from a stream. It returns that byte |
* This method reading a byte of data from a stream. It returns that byte |
65 |
* as an int. This method blocks if no data is available to be read. |
* as an <code>int</code>. This method blocks if no data is available |
66 |
|
* to be read. |
67 |
* |
* |
68 |
* @return The byte of data read |
* @return The byte of data read |
69 |
* |
* |
79 |
* |
* |
80 |
* @param buf The byte array to receive the data read |
* @param buf The byte array to receive the data read |
81 |
* |
* |
82 |
* @return The actual number fo bytes read or -1 if end of stream |
* @return The actual number of bytes read or -1 if end of stream |
83 |
* |
* |
84 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
85 |
*/ |
*/ |
95 |
* possible. |
* possible. |
96 |
* |
* |
97 |
* @param buf The byte array to receive the data read |
* @param buf The byte array to receive the data read |
98 |
* @param offset The offset into @code{buf} to start storing data |
* @param offset The offset into <code>buf</code> to start storing data |
99 |
* @param len The maximum number of bytes to read |
* @param len The maximum number of bytes to read |
100 |
* |
* |
101 |
* @return The actual number fo bytes read or -1 if end of stream |
* @return The actual number of bytes read or -1 if end of stream |
102 |
* |
* |
103 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
104 |
*/ |
*/ |
106 |
|
|
107 |
/** |
/** |
108 |
* Reads an object instance and returns it. If the class for the object |
* Reads an object instance and returns it. If the class for the object |
109 |
* being read cannot be found, then a ClassNotFoundException will |
* being read cannot be found, then a <code>ClassNotFoundException</code> |
110 |
* be thrown. |
* will be thrown. |
111 |
* |
* |
112 |
* @return The object instance that was read |
* @return The object instance that was read |
113 |
* |
* |
114 |
* @exception ClassNotFoundException If a class for the object cannot be |
* @exception ClassNotFoundException If a class for the object cannot be |
115 |
* found |
* found |
116 |
* @exception IOException If an error occurs |
* @exception IOException If any other error occurs |
117 |
*/ |
*/ |
118 |
public abstract Object readObject() |
public abstract Object readObject() |
119 |
throws ClassNotFoundException, IOException; |
throws ClassNotFoundException, IOException; |
129 |
* |
* |
130 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
131 |
*/ |
*/ |
132 |
public abstract long skip(long num_bytes) throws IOException; |
public abstract long skip(long numBytes) throws IOException; |
133 |
|
|
134 |
/** |
/** |
135 |
* This method closes the input source |
* This method closes the input source |