228 * @exception NotActiveException Thrown if a readObject method is not |
228 * @exception NotActiveException Thrown if a readObject method is not |
229 * active. |
229 * active. |
230 * @exception ClassNotFoundException if no corresponding local class can be |
230 * @exception ClassNotFoundException if no corresponding local class can be |
231 * found in the local JVM. |
231 * found in the local JVM. |
232 */ |
232 */ |
233 abstract public void defaultReadObject() |
233 public abstract void defaultReadObject() |
234 throws IOException, ClassNotFoundException, NotActiveException; |
234 throws IOException, ClassNotFoundException, NotActiveException; |
235 |
235 |
236 /** |
236 /** |
237 * Enable allocation for subclass reimplementing serialization.<p> |
237 * Enable allocation for subclass reimplementing serialization.<p> |
238 * |
238 * |
250 * @exception IllegalAccessException if no-arg constructor of |
250 * @exception IllegalAccessException if no-arg constructor of |
251 * <STRONG>ctorClass</STRONG> is not accessible from |
251 * <STRONG>ctorClass</STRONG> is not accessible from |
252 * <STRONG>ofClass</STRONG>. |
252 * <STRONG>ofClass</STRONG>. |
253 * @exception InstantiationException TBD. |
253 * @exception InstantiationException TBD. |
254 */ |
254 */ |
255 final protected native Object |
255 protected final native Object |
256 allocateNewObject(Class ofClass, Class ctorClass) |
256 allocateNewObject(Class ofClass, Class ctorClass) |
257 throws InstantiationException, IllegalAccessException; |
257 throws InstantiationException, IllegalAccessException; |
258 |
258 |
259 /** |
259 /** |
260 * Enable allocation for subclass reimplementing serialization.<p> |
260 * Enable allocation for subclass reimplementing serialization.<p> |
281 * @exception java.lang.ClassNotFoundException if the class of a serialized |
281 * @exception java.lang.ClassNotFoundException if the class of a serialized |
282 * object could not be found. |
282 * object could not be found. |
283 * @exception IOException if an I/O error occurs. |
283 * @exception IOException if an I/O error occurs. |
284 * @exception NotActiveException if readObject() is not currently active. |
284 * @exception NotActiveException if readObject() is not currently active. |
285 */ |
285 */ |
286 abstract public ObjectInputStream.GetField readFields() |
286 public abstract ObjectInputStream.GetField readFields() |
287 throws IOException, ClassNotFoundException, NotActiveException; |
287 throws IOException, ClassNotFoundException, NotActiveException; |
288 |
288 |
289 abstract protected boolean enableResolveObject(boolean enable) throws SecurityException; |
289 protected abstract boolean enableResolveObject(boolean enable) throws SecurityException; |
290 |
290 |
291 abstract public void registerValidation(ObjectInputValidation obj, |
291 public abstract void registerValidation(ObjectInputValidation obj, |
292 int prio) |
292 int prio) |
293 throws NotActiveException, InvalidObjectException; |
293 throws NotActiveException, InvalidObjectException; |
294 |
294 |
295 |
295 |
296 /****************************************************************/ |
296 /****************************************************************/ |
297 |
297 |
298 /* Use DataInput methods to read primitive data from the stream. */ |
298 /* Use DataInput methods to read primitive data from the stream. */ |
299 |
299 |
300 abstract public int read() throws IOException; |
300 public abstract int read() throws IOException; |
301 abstract public int read(byte[] data, int offset, int length) |
301 public abstract int read(byte[] data, int offset, int length) |
302 throws IOException; |
302 throws IOException; |
303 abstract public boolean readBoolean() throws IOException; |
303 public abstract boolean readBoolean() throws IOException; |
304 abstract public byte readByte() throws IOException; |
304 public abstract byte readByte() throws IOException; |
305 abstract public int readUnsignedByte() throws IOException; |
305 public abstract int readUnsignedByte() throws IOException; |
306 abstract public short readShort() throws IOException; |
306 public abstract short readShort() throws IOException; |
307 abstract public int readUnsignedShort() throws IOException; |
307 public abstract int readUnsignedShort() throws IOException; |
308 abstract public char readChar() throws IOException; |
308 public abstract char readChar() throws IOException; |
309 abstract public int readInt() throws IOException; |
309 public abstract int readInt() throws IOException; |
310 abstract public long readLong() throws IOException; |
310 public abstract long readLong() throws IOException; |
311 abstract public float readFloat() throws IOException; |
311 public abstract float readFloat() throws IOException; |
312 abstract public double readDouble() throws IOException; |
312 public abstract double readDouble() throws IOException; |
313 abstract public void readFully(byte[] data) throws IOException; |
313 public abstract void readFully(byte[] data) throws IOException; |
314 abstract public void readFully(byte[] data, int offset, int size) throws IOException; |
314 public abstract void readFully(byte[] data, int offset, int size) throws IOException; |
315 abstract public String readUTF() throws IOException; |
315 public abstract String readUTF() throws IOException; |
316 abstract public int available() throws IOException; |
316 public abstract int available() throws IOException; |
317 abstract public int skipBytes(int len) throws IOException; |
317 public abstract int skipBytes(int len) throws IOException; |
318 |
318 |
319 /* @deprecated */ |
319 /* @deprecated */ |
320 abstract public String readLine() throws IOException; |
320 public abstract String readLine() throws IOException; |
321 }; |
321 }; |