1 @deftypemethod BufferedInputStream {public synchronized int} available () @*throws IOException
4 @deftypemethod BufferedInputStream {public void} close () @*throws IOException
7 @deftypemethod BufferedInputStream {public synchronized void} mark (int@w{ }@var{readlimit})
10 @deftypemethod BufferedInputStream {public boolean} markSupported ()
13 @deftypemethod BufferedInputStream {public synchronized int} read () @*throws IOException
16 @deftypemethod BufferedInputStream {public synchronized int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
19 @deftypemethod BufferedInputStream {public synchronized void} reset () @*throws IOException
22 @deftypemethod BufferedInputStream {public synchronized long} skip (long@w{ }@var{n}) @*throws IOException
25 @deftypemethod BufferedOutputStream {public synchronized void} flush () @*throws IOException
26 This method causes any currently buffered bytes to be immediately
27 written to the underlying output stream.
29 @deftypemethod BufferedOutputStream {public synchronized void} write (int@w{ }@var{b}) @*throws IOException
30 This method writes a single byte of data. This will be written to the
31 buffer instead of the underlying data source. However, if the buffer
32 is filled as a result of this write request, it will be flushed to the
33 underlying output stream.
35 @deftypemethod BufferedOutputStream {public synchronized void} write (byte[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
36 This method writes @code{len} bytes from the byte array
37 @code{buf} starting at position @code{offset} in the buffer.
38 These bytes will be written to the internal buffer. However, if this
39 write operation fills the buffer, the buffer will be flushed to the
40 underlying output stream.
42 @deftypemethod BufferedReader {public void} close () @*throws IOException
43 This method closes the stream
45 @deftypemethod BufferedReader {public boolean} markSupported ()
46 Returns @code{true} to indicate that this class supports mark/reset
49 @deftypemethod BufferedReader {public void} mark (int@w{ }@var{readLimit}) @*throws IOException
50 Mark a position in the input to which the stream can be
51 "reset" by calling the @code{reset()} method. The parameter
52 @code{readlimit} is the number of chars that can be read from the
53 stream after setting the mark before the mark becomes invalid. For
54 example, if @code{mark()} is called with a read limit of 10, then
55 when 11 chars of data are read from the stream before the
56 @code{reset()} method is called, then the mark is invalid and the
57 stream object instance is not required to remember the mark.
61 Note that the number of chars that can be remembered by this method
62 can be greater than the size of the internal read buffer. It is also
63 not dependent on the subordinate stream supporting mark/reset
66 @deftypemethod BufferedReader {public void} reset () @*throws IOException
67 Reset the stream to the point where the @code{mark()} method
68 was called. Any chars that were read after the mark point was set will
69 be re-read during subsequent reads.
73 This method will throw an IOException if the number of chars read from
74 the stream since the call to @code{mark()} exceeds the mark limit
75 passed when establishing the mark.
77 @deftypemethod BufferedReader {public boolean} ready () @*throws IOException
78 This method determines whether or not a stream is ready to be read. If
79 This method returns @code{false} then this stream could (but is
80 not guaranteed to) block on the next read attempt.
82 @deftypemethod BufferedReader {public int} read (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
83 This method read chars from a stream and stores them into a caller
84 supplied buffer. It starts storing the data at index @code{offset} into
85 the buffer and attempts to read @code{len} chars. This method can
86 return before reading the number of chars requested. The actual number
87 of chars read is returned as an int. A -1 is returned to indicate the
92 This method will block until some data can be read.
94 @deftypemethod BufferedReader {public int} read () @*throws IOException
97 @deftypemethod BufferedReader {public String} readLine () @*throws IOException
98 This method reads a single line of text from the input stream, returning
99 it as a @code{String}. A line is terminated by "\n", a "\r", or
100 an "\r\n" sequence. The system dependent line separator is not used.
101 The line termination characters are not returned in the resulting
104 @deftypemethod BufferedReader {public long} skip (long@w{ }@var{count}) @*throws IOException
105 This method skips the specified number of chars in the stream. It
106 returns the actual number of chars skipped, which may be less than the
111 This method first discards chars in the buffer, then calls the
112 @code{skip} method on the underlying stream to skip the remaining chars.
114 @deftypemethod BufferedWriter {public void} close () @*throws IOException
115 This method flushes any remaining buffered chars then closes the
116 underlying output stream. Any further attempts to write to this stream
117 may throw an exception
119 @deftypemethod BufferedWriter {public void} flush () @*throws IOException
120 This method causes any currently buffered chars to be immediately
121 written to the underlying output stream.
123 @deftypemethod BufferedWriter {public void} newLine () @*throws IOException
124 This method writes out a system depedent line separator sequence. The
125 actual value written is detemined from the <xmp>line.separator</xmp>
128 @deftypemethod BufferedWriter {public void} write (int@w{ }@var{oneChar}) @*throws IOException
129 This method writes a single char of data. This will be written to the
130 buffer instead of the underlying data source. However, if the buffer
131 is filled as a result of this write request, it will be flushed to the
132 underlying output stream.
134 @deftypemethod BufferedWriter {public void} write (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
135 This method writes @code{len} chars from the char array
136 @code{buf} starting at position @code{offset} in the buffer.
137 These chars will be written to the internal buffer. However, if this
138 write operation fills the buffer, the buffer will be flushed to the
139 underlying output stream.
141 @deftypemethod BufferedWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
142 This method writes @code{len} chars from the @code{String}
143 @code{str} starting at position @code{offset} in the string.
144 These chars will be written to the internal buffer. However, if this
145 write operation fills the buffer, the buffer will be flushed to the
146 underlying output stream.
148 @deftypemethod ByteArrayInputStream {public synchronized int} available ()
151 @deftypemethod ByteArrayInputStream {public synchronized void} mark (int@w{ }@var{readAheadLimit})
154 @deftypemethod ByteArrayInputStream {public boolean} markSupported ()
157 @deftypemethod ByteArrayInputStream {public synchronized int} read ()
160 @deftypemethod ByteArrayInputStream {public synchronized int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len})
163 @deftypemethod ByteArrayInputStream {public synchronized void} reset ()
166 @deftypemethod ByteArrayInputStream {public synchronized long} skip (long@w{ }@var{n})
169 @deftypemethod ByteArrayOutputStream {public synchronized void} reset ()
170 This method discards all of the bytes that have been written to
171 the internal buffer so far by setting the @code{count}
172 variable to 0. The internal buffer remains at its currently
175 @deftypemethod ByteArrayOutputStream {public int} size ()
176 This method returns the number of bytes that have been written to
177 the buffer so far. This is the same as the value of the protected
178 @code{count} variable. If the @code{reset} method is
179 called, then this value is reset as well. Note that this method does
180 not return the length of the internal buffer, but only the number
181 of bytes that have been written to it.
183 @deftypemethod ByteArrayOutputStream {public synchronized byte} toByteArray ()
184 This method returns a byte array containing the bytes that have been
185 written to this stream so far. This array is a copy of the valid
186 bytes in the internal buffer and its length is equal to the number of
187 valid bytes, not necessarily to the the length of the current
188 internal buffer. Note that since this method allocates a new array,
189 it should be used with caution when the internal buffer is very large.
191 @deftypemethod ByteArrayOutputStream {public String} toString ()
192 Returns the bytes in the internal array as a @code{String}. The
193 bytes in the buffer are converted to characters using the system default
194 encoding. There is an overloaded @code{toString()} method that
195 allows an application specified character encoding to be used.
197 @deftypemethod ByteArrayOutputStream {public String} toString (java.lang.String@w{ }@var{enc}) @*throws UnsupportedEncodingException
198 Returns the bytes in the internal array as a @code{String}. The
199 bytes in the buffer are converted to characters using the specified
202 @deftypemethod ByteArrayOutputStream {public String} toString (int@w{ }@var{hibyte})
203 This method returns the bytes in the internal array as a
204 @code{String}. It uses each byte in the array as the low
205 order eight bits of the Unicode character value and the passed in
206 parameter as the high eight bits.
210 This method does not convert bytes to characters in the proper way and
211 so is deprecated in favor of the other overloaded @code{toString}
212 methods which use a true character encoding.
214 @deftypemethod ByteArrayOutputStream {public synchronized void} write (int@w{ }@var{oneByte})
215 This method writes the writes the specified byte into the internal
218 @deftypemethod ByteArrayOutputStream {public synchronized void} write (byte[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{add})
219 This method writes @code{len} bytes from the passed in array
220 @code{buf} starting at index @code{offset} into the
223 @deftypemethod ByteArrayOutputStream {public synchronized void} writeTo (java.io.OutputStream@w{ }@var{out}) @*throws IOException
224 This method writes all the bytes that have been written to this stream
225 from the internal buffer to the specified @code{OutputStream}.
227 @deftypemethod CharArrayReader {public void} close ()
230 @deftypemethod CharArrayReader {public void} mark (int@w{ }@var{readAheadLimit})
233 @deftypemethod CharArrayReader {public boolean} markSupported ()
236 @deftypemethod CharArrayReader {public int} read () @*throws IOException
239 @deftypemethod CharArrayReader {public int} read (char[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
242 @deftypemethod CharArrayReader {public boolean} ready () @*throws IOException
245 @deftypemethod CharArrayReader {public void} reset () @*throws IOException
248 @deftypemethod CharArrayReader {public long} skip (long@w{ }@var{n}) @*throws IOException
251 @deftypemethod CharArrayWriter {public void} close ()
254 @deftypemethod CharArrayWriter {public void} flush ()
257 @deftypemethod CharArrayWriter {public synchronized void} reset ()
260 @deftypemethod CharArrayWriter {public int} size ()
263 @deftypemethod CharArrayWriter {public char} toCharArray ()
266 @deftypemethod CharArrayWriter {public String} toString ()
269 @deftypemethod CharArrayWriter {public void} write (int@w{ }@var{oneChar})
272 @deftypemethod CharArrayWriter {public void} write (char[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{len})
275 @deftypemethod CharArrayWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{len})
278 @deftypemethod CharArrayWriter {public void} writeTo (java.io.Writer@w{ }@var{out}) @*throws IOException
281 @deftypemethod DataInput {public boolean} readBoolean () @*throws IOException
284 @deftypemethod DataInput {public byte} readByte () @*throws IOException
287 @deftypemethod DataInput {public char} readChar () @*throws IOException
290 @deftypemethod DataInput {public double} readDouble () @*throws IOException
293 @deftypemethod DataInput {public float} readFloat () @*throws IOException
296 @deftypemethod DataInput {public void} readFully (byte[]@w{ }@var{b}) @*throws IOException, NullPointerException
299 @deftypemethod DataInput {public void} readFully (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
302 @deftypemethod DataInput {public int} readInt () @*throws IOException
305 @deftypemethod DataInput {public String} readLine () @*throws IOException
308 @deftypemethod DataInput {public long} readLong () @*throws IOException
311 @deftypemethod DataInput {public short} readShort () @*throws IOException
314 @deftypemethod DataInput {public int} readUnsignedByte () @*throws IOException
317 @deftypemethod DataInput {public int} readUnsignedShort () @*throws IOException
320 @deftypemethod DataInput {public String} readUTF () @*throws IOException
323 @deftypemethod DataInput {public int} skipBytes (int@w{ }@var{n}) @*throws IOException
326 @deftypemethod DataInputStream {public final int} read (byte[]@w{ }@var{b}) @*throws IOException
327 This method reads bytes from the underlying stream into the specified
328 byte array buffer. It will attempt to fill the buffer completely, but
329 may return a short count if there is insufficient data remaining to be
330 read to fill the buffer.
332 @deftypemethod DataInputStream {public final int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
333 This method reads bytes from the underlying stream into the specified
334 byte array buffer. It will attempt to read @code{len} bytes and
335 will start storing them at position @code{off} into the buffer.
336 This method can return a short count if there is insufficient data
337 remaining to be read to complete the desired read length.
339 @deftypemethod DataInputStream {public final boolean} readBoolean () @*throws IOException
340 This method reads a Java boolean value from an input stream. It does
341 so by reading a single byte of data. If that byte is zero, then the
342 value returned is @code{false}. If the byte is non-zero, then
343 the value returned is @code{true}.
347 This method can read a @code{boolean} written by an object
348 implementing the @code{writeBoolean()} method in the
349 @code{DataOutput} interface.
351 @deftypemethod DataInputStream {public final byte} readByte () @*throws IOException
352 This method reads a Java byte value from an input stream. The value
353 is in the range of -128 to 127.
357 This method can read a @code{byte} written by an object
358 implementing the @code{writeByte()} method in the
359 @code{DataOutput} interface.
361 @deftypemethod DataInputStream {public final char} readChar () @*throws IOException
362 This method reads a Java @code{char} value from an input stream.
363 It operates by reading two bytes from the stream and converting them to
364 a single 16-bit Java @code{char}. The two bytes are stored most
365 significant byte first (i.e., "big endian") regardless of the native
370 As an example, if @code{byte1} and @code{byte2}
371 represent the first and second byte read from the stream
372 respectively, they will be transformed to a @code{char} in
373 the following manner:
377 @code{(char)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)}
381 This method can read a @code{char} written by an object
382 implementing the @code{writeChar()} method in the
383 @code{DataOutput} interface.
385 @deftypemethod DataInputStream {public final double} readDouble () @*throws IOException
386 This method reads a Java double value from an input stream. It operates
387 by first reading a @code{long} value from the stream by calling the
388 @code{readLong()} method in this interface, then converts
389 that @code{long} to a @code{double} using the
390 @code{longBitsToDouble} method in the class
391 @code{java.lang.Double}
395 This method can read a @code{double} written by an object
396 implementing the @code{writeDouble()} method in the
397 @code{DataOutput} interface.
399 @deftypemethod DataInputStream {public final float} readFloat () @*throws IOException
400 This method reads a Java float value from an input stream. It
401 operates by first reading an @code{int} value from the
402 stream by calling the @code{readInt()} method in this
403 interface, then converts that @code{int} to a
404 @code{float} using the @code{intBitsToFloat} method
405 in the class @code{java.lang.Float}
409 This method can read a @code{float} written by an object
410 implementing the * @code{writeFloat()} method in the
411 @code{DataOutput} interface.
413 @deftypemethod DataInputStream {public final void} readFully (byte[]@w{ }@var{b}) @*throws IOException
414 This method reads raw bytes into the passed array until the array is
415 full. Note that this method blocks until the data is available and
416 throws an exception if there is not enough data left in the stream to
419 @deftypemethod DataInputStream {public final void} readFully (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
420 This method reads raw bytes into the passed array
421 @code{buf} starting @code{offset} bytes into the
422 buffer. The number of bytes read will be exactly
423 @code{len} Note that this method blocks until the data is
424 available and * throws an exception if there is not enough data
425 left in the stream to read @code{len} bytes.
427 @deftypemethod DataInputStream {public final int} readInt () @*throws IOException
428 This method reads a Java @code{int} value from an input
429 stream It operates by reading four bytes from the stream and
430 converting them to a single Java @code{int} The bytes are
431 stored most significant byte first (i.e., "big endian")
432 regardless of the native host byte ordering.
436 As an example, if @code{byte1} through @code{byte4}
437 represent the first four bytes read from the stream, they will be
438 transformed to an @code{int} in the following manner:
442 @code{(int)(((byte1 & 0xFF) << 24) + ((byte2 & 0xFF) << 16) +
443 ((byte3 & 0xFF) << 8) + (byte4 & 0xFF)))}
447 The value returned is in the range of 0 to 65535.
451 This method can read an @code{int} written by an object
452 implementing the @code{writeInt()} method in the
453 @code{DataOutput} interface.
455 @deftypemethod DataInputStream {public final String} readLine () @*throws IOException
456 This method reads the next line of text data from an input
457 stream. It operates by reading bytes and converting those bytes
458 to @code{char} values by treating the byte read as the low
459 eight bits of the @code{char} and using 0 as the high eight
460 bits. Because of this, it does not support the full 16-bit
461 Unicode character set.
465 The reading of bytes ends when either the end of file or a line
466 terminator is encountered. The bytes read are then returned as a
467 @code{String} A line terminator is a byte sequence
468 consisting of either @code{\r}, @code{\n} or
469 @code{\r\n}. These termination charaters are discarded and
470 are not returned as part of the string.
474 This method can read data that was written by an object implementing the
475 @code{writeLine()} method in @code{DataOutput}.
477 @deftypemethod DataInputStream {public final long} readLong () @*throws IOException
478 This method reads a Java long value from an input stream
479 It operates by reading eight bytes from the stream and converting them to
480 a single Java @code{long} The bytes are stored most
481 significant byte first (i.e., "big endian") regardless of the native
486 As an example, if @code{byte1} through @code{byte8}
487 represent the first eight bytes read from the stream, they will
488 be transformed to an @code{long} in the following manner:
492 @code{(long)((((long)byte1 & 0xFF) << 56) + (((long)byte2 & 0xFF) << 48) +
493 (((long)byte3 & 0xFF) << 40) + (((long)byte4 & 0xFF) << 32) +
494 (((long)byte5 & 0xFF) << 24) + (((long)byte6 & 0xFF) << 16) +
495 (((long)byte7 & 0xFF) << 8) + ((long)byte9 & 0xFF)))}
499 The value returned is in the range of 0 to 65535.
503 This method can read an @code{long} written by an object
504 implementing the @code{writeLong()} method in the
505 @code{DataOutput} interface.
507 @deftypemethod DataInputStream {public final short} readShort () @*throws IOException
508 This method reads a signed 16-bit value into a Java in from the
509 stream. It operates by reading two bytes from the stream and
510 converting them to a single 16-bit Java @code{short}. The
511 two bytes are stored most significant byte first (i.e., "big
512 endian") regardless of the native host byte ordering.
516 As an example, if @code{byte1} and @code{byte2}
517 represent the first and second byte read from the stream
518 respectively, they will be transformed to a @code{short}. in
519 the following manner:
523 @code{(short)(((byte1 & 0xFF) << 8) | (byte2 & 0xFF)}
527 The value returned is in the range of -32768 to 32767.
531 This method can read a @code{short} written by an object
532 implementing the @code{writeShort()} method in the
533 @code{DataOutput} interface.
535 @deftypemethod DataInputStream {public final int} readUnsignedByte () @*throws IOException
536 This method reads 8 unsigned bits into a Java @code{int}
537 value from the stream. The value returned is in the range of 0 to
542 This method can read an unsigned byte written by an object
543 implementing the @code{writeUnsignedByte()} method in the
544 @code{DataOutput} interface.
546 @deftypemethod DataInputStream {public final int} readUnsignedShort () @*throws IOException
547 This method reads 16 unsigned bits into a Java int value from the stream.
548 It operates by reading two bytes from the stream and converting them to
549 a single Java @code{int} The two bytes are stored most
550 significant byte first (i.e., "big endian") regardless of the native
555 As an example, if @code{byte1} and @code{byte2}
556 represent the first and second byte read from the stream
557 respectively, they will be transformed to an @code{int} in
558 the following manner:
562 @code{(int)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF))}
566 The value returned is in the range of 0 to 65535.
570 This method can read an unsigned short written by an object
571 implementing the @code{writeUnsignedShort()} method in the
572 @code{DataOutput} interface.
574 @deftypemethod DataInputStream {public final String} readUTF () @*throws IOException
575 This method reads a @code{String} from an input stream that
576 is encoded in a modified UTF-8 format. This format has a leading
577 two byte sequence that contains the remaining number of bytes to
578 read. This two byte sequence is read using the
579 @code{readUnsignedShort()} method of this interface.
583 After the number of remaining bytes have been determined, these
584 bytes are read an transformed into @code{char} values.
585 These @code{char} values are encoded in the stream using
586 either a one, two, or three byte format. The particular format
587 in use can be determined by examining the first byte read.
591 If the first byte has a high order bit of 0, then that character
592 consists on only one byte. This character value consists of
593 seven bits that are at positions 0 through 6 of the byte. As an
594 example, if @code{byte1} is the byte read from the stream,
595 it would be converted to a @code{char} like so:
603 If the first byte has 110 as its high order bits, then the
604 character consists of two bytes. The bits that make up the character
605 value are in positions 0 through 4 of the first byte and bit positions
606 0 through 5 of the second byte. (The second byte should have
607 10 as its high order bits). These values are in most significant
608 byte first (i.e., "big endian") order.
612 As an example, if @code{byte1} and @code{byte2} are
613 the first two bytes read respectively, and the high order bits of
614 them match the patterns which indicate a two byte character
615 encoding, then they would be converted to a Java
620 @code{(char)(((byte1 & 0x1F) << 6) | (byte2 & 0x3F))}
624 If the first byte has a 1110 as its high order bits, then the
625 character consists of three bytes. The bits that make up the character
626 value are in positions 0 through 3 of the first byte and bit positions
627 0 through 5 of the other two bytes. (The second and third bytes should
628 have 10 as their high order bits). These values are in most
629 significant byte first (i.e., "big endian") order.
633 As an example, if @code{byte1} @code{byte2} and
634 @code{byte3} are the three bytes read, and the high order
635 bits of them match the patterns which indicate a three byte
636 character encoding, then they would be converted to a Java
641 @code{(char)(((byte1 & 0x0F) << 12) | ((byte2 & 0x3F) << 6) | (byte3 & 0x3F))}
645 Note that all characters are encoded in the method that requires
646 the fewest number of bytes with the exception of the character
647 with the value of @code{\u0000} which is encoded as two
648 bytes. This is a modification of the UTF standard used to
649 prevent C language style @code{NUL} values from appearing
654 This method can read data that was written by an object implementing the
655 @code{writeUTF()} method in @code{DataOutput}
657 @deftypemethod DataInputStream {public static final String} readUTF (java.io.DataInput@w{ }@var{in}) @*throws IOException
658 This method reads a String encoded in UTF-8 format from the
659 specified @code{DataInput} source.
661 @deftypemethod DataInputStream {public final int} skipBytes (int@w{ }@var{n}) @*throws IOException
662 This method attempts to skip and discard the specified number of bytes
663 in the input stream. It may actually skip fewer bytes than requested.
664 This method will not skip any bytes if passed a negative number of bytes
667 @deftypemethod DataOutput {public void} write (int@w{ }@var{b}) @*throws IOException
670 @deftypemethod DataOutput {public void} write (byte[]@w{ }@var{b}) @*throws IOException, NullPointerException
673 @deftypemethod DataOutput {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
676 @deftypemethod DataOutput {public void} writeBoolean (boolean@w{ }@var{v}) @*throws IOException
679 @deftypemethod DataOutput {public void} writeByte (int@w{ }@var{v}) @*throws IOException
682 @deftypemethod DataOutput {public void} writeShort (int@w{ }@var{v}) @*throws IOException
685 @deftypemethod DataOutput {public void} writeChar (int@w{ }@var{v}) @*throws IOException
688 @deftypemethod DataOutput {public void} writeInt (int@w{ }@var{v}) @*throws IOException
691 @deftypemethod DataOutput {public void} writeLong (long@w{ }@var{v}) @*throws IOException
694 @deftypemethod DataOutput {public void} writeFloat (float@w{ }@var{v}) @*throws IOException
697 @deftypemethod DataOutput {public void} writeDouble (double@w{ }@var{v}) @*throws IOException
700 @deftypemethod DataOutput {public void} writeBytes (java.lang.String@w{ }@var{s}) @*throws IOException, NullPointerException
703 @deftypemethod DataOutput {public void} writeChars (java.lang.String@w{ }@var{s}) @*throws IOException, NullPointerException
706 @deftypemethod DataOutput {public void} writeUTF (java.lang.String@w{ }@var{s}) @*throws IOException, NullPointerException
709 @deftypemethod DataOutputStream {public void} flush () @*throws IOException
712 @deftypemethod DataOutputStream {public final int} size ()
715 @deftypemethod DataOutputStream {public synchronized void} write (int@w{ }@var{b}) @*throws IOException
718 @deftypemethod DataOutputStream {public synchronized void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
721 @deftypemethod DataOutputStream {public final void} writeBoolean (boolean@w{ }@var{v}) @*throws IOException
724 @deftypemethod DataOutputStream {public final void} writeByte (int@w{ }@var{v}) @*throws IOException
727 @deftypemethod DataOutputStream {public final void} writeShort (int@w{ }@var{v}) @*throws IOException
730 @deftypemethod DataOutputStream {public final void} writeChar (int@w{ }@var{v}) @*throws IOException
733 @deftypemethod DataOutputStream {public final void} writeInt (int@w{ }@var{v}) @*throws IOException
736 @deftypemethod DataOutputStream {public final void} writeLong (long@w{ }@var{v}) @*throws IOException
739 @deftypemethod DataOutputStream {public final void} writeFloat (float@w{ }@var{v}) @*throws IOException
742 @deftypemethod DataOutputStream {public final void} writeDouble (double@w{ }@var{v}) @*throws IOException
745 @deftypemethod DataOutputStream {public final void} writeBytes (java.lang.String@w{ }@var{s}) @*throws IOException
748 @deftypemethod DataOutputStream {public final void} writeChars (java.lang.String@w{ }@var{s}) @*throws IOException
751 @deftypemethod DataOutputStream {public final void} writeUTF (java.lang.String@w{ }@var{s}) @*throws IOException
754 @deftypemethod Externalizable {public void} readExternal (java.io.ObjectInput@w{ }@var{in}) @*throws ClassNotFoundException, IOException
755 This method restores an object's state by reading in the instance data
756 for the object from the passed in stream. Note that this stream is not
757 a subclass of @code{InputStream}, but rather is a class that implements
758 the @code{ObjectInput} interface. That interface provides a mechanism for
759 reading in Java data types from a stream.
763 Note that this method must be compatible with @code{writeExternal}.
764 It must read back the exact same types that were written by that
765 method in the exact order they were written.
769 If this method needs to read back an object instance, then the class
770 for that object must be found and loaded. If that operation fails,
771 then this method throws a @code{ClassNotFoundException}
773 @deftypemethod Externalizable {public void} writeExternal (java.io.ObjectOutput@w{ }@var{out}) @*throws IOException
774 This method is responsible for writing the instance data of an object
775 to the passed in stream. Note that this stream is not a subclass of
776 @code{OutputStream}, but rather is a class that implements the
777 @code{ObjectOutput} interface. That interface provides a number of methods
778 for writing Java data values to a stream.
782 Not that the implementation of this method must be coordinated with
783 the implementation of @code{readExternal}.
785 @deftypemethod FileDescriptor {public native void} sync () @*throws SyncFailedException
788 @deftypemethod FileDescriptor {public native boolean} valid ()
791 @deftypemethod FileDescriptor {protected void} finalize () @*throws IOException
794 @deftypemethod FileFilter {public boolean} accept (java.io.File@w{ }@var{pathname})
795 This method determines whether or not a given pathname should be included
796 in a pathname listing.
798 @deftypemethod FileInputStream {public int} available () @*throws IOException
801 @deftypemethod FileInputStream {public void} close () @*throws IOException
804 @deftypemethod FileInputStream {protected void} finalize () @*throws IOException
807 @deftypemethod FileInputStream {public final FileDescriptor} getFD () @*throws IOException
810 @deftypemethod FileInputStream {public int} read () @*throws IOException
813 @deftypemethod FileInputStream {public int} read (byte[]@w{ }@var{b}) @*throws IOException
816 @deftypemethod FileInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
819 @deftypemethod FileInputStream {public long} skip (long@w{ }@var{n}) @*throws IOException
822 @deftypemethod File {public boolean} canRead ()
825 @deftypemethod File {public boolean} canWrite ()
828 @deftypemethod File {public boolean} delete ()
831 @deftypemethod File {public boolean} equals (java.lang.Object@w{ }@var{obj})
834 @deftypemethod File {public boolean} exists ()
837 @deftypemethod File {public String} getAbsolutePath ()
840 @deftypemethod File {public native String} getCanonicalPath () @*throws IOException
843 @deftypemethod File {public String} getName ()
846 @deftypemethod File {public String} getParent ()
849 @deftypemethod File {public File} getParentFile ()
852 @deftypemethod File {public String} getPath ()
855 @deftypemethod File {public int} hashCode ()
858 @deftypemethod File {public native boolean} isAbsolute ()
861 @deftypemethod File {public boolean} isDirectory ()
864 @deftypemethod File {public boolean} isFile ()
867 @deftypemethod File {public long} lastModified ()
870 @deftypemethod File {public long} length ()
873 @deftypemethod File {public String} list (java.io.FilenameFilter@w{ }@var{filter})
876 @deftypemethod File {public String} list ()
879 @deftypemethod File {public String} toString ()
882 @deftypemethod File {public boolean} mkdir ()
885 @deftypemethod File {public boolean} mkdirs ()
888 @deftypemethod File {public static File} createTempFile (java.lang.String@w{ }@var{prefix}, java.lang.String@w{ }@var{suffix}, java.io.File@w{ }@var{directory}) @*throws IOException
891 @deftypemethod File {public static File} createTempFile (java.lang.String@w{ }@var{prefix}, java.lang.String@w{ }@var{suffix}) @*throws IOException
894 @deftypemethod File {public boolean} renameTo (java.io.File@w{ }@var{dest})
897 @deftypemethod File {public void} deleteOnExit ()
900 @deftypemethod FilenameFilter {public boolean} accept (java.io.File@w{ }@var{dir}, java.lang.String@w{ }@var{name})
903 @deftypemethod FileOutputStream {protected void} finalize () @*throws IOException
906 @deftypemethod FileOutputStream {public final FileDescriptor} getFD () @*throws IOException
909 @deftypemethod FileOutputStream {public void} write (int@w{ }@var{b}) @*throws IOException
912 @deftypemethod FileOutputStream {public void} write (byte[]@w{ }@var{b}) @*throws IOException, NullPointerException
915 @deftypemethod FileOutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
918 @deftypemethod FileOutputStream {public void} close () @*throws IOException
921 @deftypemethod FilePermission {public String} getActions ()
922 Get the actions this FilePermission supports.
924 @deftypemethod FilePermission {public int} hashCode ()
925 Get the hash code for this Object.
928 FilePermission's hash code is calculated as the exclusive or of the target
929 String's hash code and the action String's hash code.
931 @deftypemethod FilePermission {public boolean} equals (java.lang.Object@w{ }@var{o})
932 Check two FilePermissions for semantic equality.
933 Two FilePermissions are exactly equivalent if they have identical path
934 expressions and have exactly the same access permissions.
936 @deftypemethod FilePermission {public boolean} implies (java.security.Permission@w{ }@var{p})
937 Check to see if this permission implies another.
938 Permission A implies permission B if these things are all true:
944 A and B are both FilePermissions.
948 All possible files in B are included in A (possibly more are in A).
952 All actions B supports, A also supports.
958 @deftypemethod FilterInputStream {public int} available () @*throws IOException
961 @deftypemethod FilterInputStream {public void} close () @*throws IOException
964 @deftypemethod FilterInputStream {public synchronized void} mark (int@w{ }@var{readlimit})
967 @deftypemethod FilterInputStream {public boolean} markSupported ()
970 @deftypemethod FilterInputStream {public int} read () @*throws IOException
973 @deftypemethod FilterInputStream {public int} read (byte[]@w{ }@var{b}) @*throws IOException
976 @deftypemethod FilterInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
979 @deftypemethod FilterInputStream {public synchronized void} reset () @*throws IOException
982 @deftypemethod FilterInputStream {public long} skip (long@w{ }@var{n}) @*throws IOException
985 @deftypemethod FilterOutputStream {public void} close () @*throws IOException
988 @deftypemethod FilterOutputStream {public void} flush () @*throws IOException
991 @deftypemethod FilterOutputStream {public void} write (int@w{ }@var{b}) @*throws IOException
994 @deftypemethod FilterOutputStream {public void} write (byte[]@w{ }@var{b}) @*throws IOException, NullPointerException
997 @deftypemethod FilterOutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
1000 @deftypemethod FilterReader {public void} close () @*throws IOException
1003 @deftypemethod FilterReader {public synchronized void} mark (int@w{ }@var{readlimit}) @*throws IOException
1006 @deftypemethod FilterReader {public boolean} markSupported ()
1009 @deftypemethod FilterReader {public int} read () @*throws IOException
1012 @deftypemethod FilterReader {public int} read (char[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1015 @deftypemethod FilterReader {public boolean} ready () @*throws IOException
1018 @deftypemethod FilterReader {public synchronized void} reset () @*throws IOException
1021 @deftypemethod FilterReader {public long} skip (long@w{ }@var{n}) @*throws IOException
1024 @deftypemethod FilterWriter {public void} close () @*throws IOException
1027 @deftypemethod FilterWriter {public void} flush () @*throws IOException
1030 @deftypemethod FilterWriter {public void} write (int@w{ }@var{oneChar}) @*throws IOException
1033 @deftypemethod FilterWriter {public void} write (char[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
1036 @deftypemethod FilterWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
1039 @deftypemethod InputStream {public int} available () @*throws IOException
1042 @deftypemethod InputStream {public void} close () @*throws IOException
1045 @deftypemethod InputStream {public void} mark (int@w{ }@var{readlimit})
1048 @deftypemethod InputStream {public boolean} markSupported ()
1051 @deftypemethod InputStream {public abstract int} read () @*throws IOException
1054 @deftypemethod InputStream {public int} read (byte[]@w{ }@var{b}) @*throws IOException
1057 @deftypemethod InputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1060 @deftypemethod InputStream {public void} reset () @*throws IOException
1063 @deftypemethod InputStream {public long} skip (long@w{ }@var{n}) @*throws IOException
1066 @deftypemethod InputStreamReader {public void} close () @*throws IOException
1069 @deftypemethod InputStreamReader {public String} getEncoding ()
1072 @deftypemethod InputStreamReader {public boolean} ready () @*throws IOException
1075 @deftypemethod InputStreamReader {public int} read (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{length}) @*throws IOException
1078 @deftypemethod InputStreamReader {public int} read () @*throws IOException
1081 @deftypemethod InvalidClassException {public String} getMessage ()
1082 Returns the descriptive error message for this exception. It will
1083 include the class name that caused the problem if known. This method
1084 overrides Throwable.getMessage()
1086 @deftypemethod LineNumberInputStream {public int} available () @*throws IOException
1089 @deftypemethod LineNumberInputStream {public int} getLineNumber ()
1092 @deftypemethod LineNumberInputStream {public void} mark (int@w{ }@var{readlimit})
1095 @deftypemethod LineNumberInputStream {public int} read () @*throws IOException
1098 @deftypemethod LineNumberInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1101 @deftypemethod LineNumberInputStream {public void} reset () @*throws IOException
1104 @deftypemethod LineNumberInputStream {public void} setLineNumber (int@w{ }@var{lineNumber})
1107 @deftypemethod LineNumberInputStream {public long} skip (long@w{ }@var{n}) @*throws IOException
1110 @deftypemethod LineNumberReader {public int} getLineNumber ()
1113 @deftypemethod LineNumberReader {public void} setLineNumber (int@w{ }@var{lineNumber})
1116 @deftypemethod LineNumberReader {public void} mark (int@w{ }@var{readLimit}) @*throws IOException
1119 @deftypemethod LineNumberReader {public void} reset () @*throws IOException
1122 @deftypemethod LineNumberReader {public int} read () @*throws IOException
1125 @deftypemethod LineNumberReader {public int} read (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
1128 @deftypemethod LineNumberReader {public String} readLine () @*throws IOException
1131 @deftypemethod LineNumberReader {public long} skip (long@w{ }@var{count}) @*throws IOException
1134 @deftypemethod ObjectInput {public int} available () @*throws IOException
1135 This method returns the number of bytes that can be read without
1138 @deftypemethod ObjectInput {public int} read () @*throws IOException
1139 This method reading a byte of data from a stream. It returns that byte
1140 as an int. This method blocks if no data is available to be read.
1142 @deftypemethod ObjectInput {public int} read (byte[]@w{ }@var{buf}) @*throws IOException
1143 This method reads raw bytes and stores them them a byte array buffer.
1144 Note that this method will block if no data is available. However,
1145 it will not necessarily block until it fills the entire buffer. That is,
1146 a "short count" is possible.
1148 @deftypemethod ObjectInput {public int} read (byte[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
1149 This method reads raw bytes and stores them in a byte array buffer
1150 @code{buf} starting at position @code{offset} into the buffer. A
1151 maximum of @code{len} bytes will be read. Note that this method
1152 blocks if no data is available, but will not necessarily block until
1153 it can read @code{len} bytes of data. That is, a "short count" is
1156 @deftypemethod ObjectInput {public Object} readObject () @*throws ClassNotFoundException, IOException
1157 Reads an object instance and returns it. If the class for the object
1158 being read cannot be found, then a ClassNotFoundException will
1161 @deftypemethod ObjectInput {public long} skip (long@w{ }@var{num_bytes}) @*throws IOException
1162 This method causes the specified number of bytes to be read and
1163 discarded. It is possible that fewer than the requested number of bytes
1164 will actually be skipped.
1166 @deftypemethod ObjectInput {public void} close () @*throws IOException
1167 This method closes the input source
1169 @deftypemethod ObjectInputStream {public final Object} readObject () @*throws ClassNotFoundException, IOException
1170 Returns the next deserialized object read from the underlying stream.
1172 This method can be overriden by a class by implementing
1173 @code{private void readObject (ObjectInputStream)}.
1175 If an exception is thrown from this method, the stream is left in
1178 @deftypemethod ObjectInputStream {public void} defaultReadObject () @*throws ClassNotFoundException, IOException, NotActiveException
1179 Reads the current objects non-transient, non-static fields from
1180 the current class from the underlying output stream.
1182 This method is intended to be called from within a object's
1183 @code{private void readObject (ObjectInputStream)}
1186 @deftypemethod ObjectInputStream {public void} registerValidation (java.io.ObjectInputValidation@w{ }@var{validator}, int@w{ }@var{priority}) @*throws InvalidObjectException, NotActiveException
1187 Registers a @code{ObjectInputValidation} to be carried out
1188 on the object graph currently being deserialized before it is
1189 returned to the original caller of @code{readObject ()}.
1190 The order of validation for multiple
1191 @code{ObjectInputValidation}s can be controled using
1192 @code{priority}. Validators with higher priorities are
1195 @deftypemethod ObjectInputStream {protected Class} resolveClass (java.io.ObjectStreamClass@w{ }@var{osc}) @*throws ClassNotFoundException, IOException
1196 Called when a class is being deserialized. This is a hook to
1197 allow subclasses to read in information written by the
1198 @code{annotateClass (Class)} method of an
1199 @code{ObjectOutputStream}.
1201 This implementation looks up the active call stack for a
1202 @code{ClassLoader}; if a @code{ClassLoader} is found,
1203 it is used to load the class associated with @code{osc},
1204 otherwise, the default system @code{ClassLoader} is used.
1206 @deftypemethod ObjectInputStream {protected Object} resolveObject (java.lang.Object@w{ }@var{obj}) @*throws IOException
1207 Allows subclasses to resolve objects that are read from the
1208 stream with other objects to be returned in their place. This
1209 method is called the first time each object is encountered.
1211 This method must be enabled before it will be called in the
1212 serialization process.
1214 @deftypemethod ObjectInputStream {protected boolean} enableResolveObject (boolean@w{ }@var{enable}) @*throws SecurityException
1215 If @code{enable} is @code{true} and this object is
1216 trusted, then @code{resolveObject (Object)} will be called
1217 in subsequent calls to @code{readObject (Object)}.
1218 Otherwise, @code{resolveObject (Object)} will not be called.
1220 @deftypemethod ObjectInputStream {protected void} readStreamHeader () @*throws IOException, StreamCorruptedException
1221 Reads stream magic and stream version information from the
1224 @deftypemethod ObjectInputStream {public int} read () @*throws IOException
1227 @deftypemethod ObjectInputStream {public int} read (byte[]@w{ }@var{data}, int@w{ }@var{offset}, int@w{ }@var{length}) @*throws IOException
1230 @deftypemethod ObjectInputStream {public int} available () @*throws IOException
1233 @deftypemethod ObjectInputStream {public void} close () @*throws IOException
1236 @deftypemethod ObjectInputStream {public boolean} readBoolean () @*throws IOException
1239 @deftypemethod ObjectInputStream {public byte} readByte () @*throws IOException
1242 @deftypemethod ObjectInputStream {public int} readUnsignedByte () @*throws IOException
1245 @deftypemethod ObjectInputStream {public short} readShort () @*throws IOException
1248 @deftypemethod ObjectInputStream {public int} readUnsignedShort () @*throws IOException
1251 @deftypemethod ObjectInputStream {public char} readChar () @*throws IOException
1254 @deftypemethod ObjectInputStream {public int} readInt () @*throws IOException
1257 @deftypemethod ObjectInputStream {public long} readLong () @*throws IOException
1260 @deftypemethod ObjectInputStream {public float} readFloat () @*throws IOException
1263 @deftypemethod ObjectInputStream {public double} readDouble () @*throws IOException
1266 @deftypemethod ObjectInputStream {public void} readFully (byte[]@w{ }@var{data}) @*throws IOException
1269 @deftypemethod ObjectInputStream {public void} readFully (byte[]@w{ }@var{data}, int@w{ }@var{offset}, int@w{ }@var{size}) @*throws IOException
1272 @deftypemethod ObjectInputStream {public int} skipBytes (int@w{ }@var{len}) @*throws IOException
1275 @deftypemethod ObjectInputStream {public String} readLine () @*throws IOException
1278 @deftypemethod ObjectInputStream {public String} readUTF () @*throws IOException
1281 @deftypemethod ObjectInputStream {public ObjectInputStream.GetField} readFields () @*throws IOException, ClassNotFoundException, NotActiveException
1284 @deftypemethod ObjectInputStream {protected Object} readObjectOverride () @*throws ClassNotFoundException, IOException, OptionalDataException
1285 This method allows subclasses to override the default
1286 de serialization mechanism provided by
1287 @code{ObjectInputStream}. To make this method be used for
1288 writing objects, subclasses must invoke the 0-argument
1289 constructor on this class from there constructor.
1291 @deftypemethod ObjectInputStream.GetField {public abstract ObjectStreamClass} getObjectStreamClass ()
1294 @deftypemethod ObjectInputStream.GetField {public abstract boolean} defaulted (java.lang.String@w{ }@var{name}) @*throws IOException, IllegalArgumentException
1297 @deftypemethod ObjectInputStream.GetField {public abstract boolean} get (java.lang.String@w{ }@var{name}, boolean@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1300 @deftypemethod ObjectInputStream.GetField {public abstract char} get (java.lang.String@w{ }@var{name}, char@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1303 @deftypemethod ObjectInputStream.GetField {public abstract byte} get (java.lang.String@w{ }@var{name}, byte@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1306 @deftypemethod ObjectInputStream.GetField {public abstract short} get (java.lang.String@w{ }@var{name}, short@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1309 @deftypemethod ObjectInputStream.GetField {public abstract int} get (java.lang.String@w{ }@var{name}, int@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1312 @deftypemethod ObjectInputStream.GetField {public abstract long} get (java.lang.String@w{ }@var{name}, long@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1315 @deftypemethod ObjectInputStream.GetField {public abstract float} get (java.lang.String@w{ }@var{name}, float@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1318 @deftypemethod ObjectInputStream.GetField {public abstract double} get (java.lang.String@w{ }@var{name}, double@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1321 @deftypemethod ObjectInputStream.GetField {public abstract Object} get (java.lang.String@w{ }@var{name}, java.lang.Object@w{ }@var{defvalue}) @*throws IOException, IllegalArgumentException
1324 @deftypemethod ObjectInputValidation {public void} validateObject () @*throws InvalidObjectException
1325 This method is called to validate an object. If the object is invalid
1326 an exception is thrown.
1328 @deftypemethod ObjectOutput {public void} write (int@w{ }@var{b}) @*throws IOException
1329 This method writes the specified byte to the output stream.
1331 @deftypemethod ObjectOutput {public void} write (byte[]@w{ }@var{buf}) @*throws IOException
1332 This method writes all the bytes in the specified byte array to the
1335 @deftypemethod ObjectOutput {public void} write (byte[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
1336 This method writes @code{len} bytes from the specified array
1337 starting at index @code{offset} into that array.
1339 @deftypemethod ObjectOutput {public void} writeObject (java.lang.Object@w{ }@var{obj}) @*throws IOException
1340 This method writes a object instance to a stream. The format of the
1341 data written is determined by the actual implementation of this method
1343 @deftypemethod ObjectOutput {public void} flush () @*throws IOException
1344 This method causes any buffered data to be flushed out to the underlying
1347 @deftypemethod ObjectOutput {public void} close () @*throws IOException
1348 This method closes the underlying stream.
1350 @deftypemethod ObjectOutputStream {public final void} writeObject (java.lang.Object@w{ }@var{obj}) @*throws IOException
1351 Writes a representation of @code{obj} to the underlying
1352 output stream by writing out information about its class, then
1353 writing out each of the objects non-transient, non-static
1354 fields. If any of these fields are other objects,
1355 they are written out in the same manner.
1357 This method can be overriden by a class by implementing
1358 @code{private void writeObject (ObjectOutputStream)}.
1360 If an exception is thrown from this method, the stream is left in
1363 @deftypemethod ObjectOutputStream {public void} defaultWriteObject () @*throws IOException, NotActiveException
1364 Writes the current objects non-transient, non-static fields from
1365 the current class to the underlying output stream.
1367 This method is intended to be called from within a object's
1368 @code{private void writeObject (ObjectOutputStream)}
1371 @deftypemethod ObjectOutputStream {public void} reset () @*throws IOException
1372 Resets stream to state equivalent to the state just after it was
1375 Causes all objects previously written to the stream to be
1376 forgotten. A notification of this reset is also written to the
1379 @deftypemethod ObjectOutputStream {public void} useProtocolVersion (int@w{ }@var{version}) @*throws IOException
1380 Informs this @code{ObjectOutputStream} to write data
1381 according to the specified protocol. There are currently two
1382 different protocols, specified by @code{PROTOCOL_VERSION_1}
1383 and @code{PROTOCOL_VERSION_2}. This implementation writes
1384 data using @code{PROTOCOL_VERSION_1} by default, as is done
1387 A non-portable method, @code{setDefaultProtocolVersion (int
1388 version)} is provided to change the default protocol
1391 For an explination of the differences beween the two protocols
1392 see XXX: the Java ObjectSerialization Specification.
1394 @deftypemethod ObjectOutputStream {public static void} setDefaultProtocolVersion (int@w{ }@var{version}) @*throws IOException
1395 <em>GNU $classpath specific</em>
1397 Changes the default stream protocol used by all
1398 @code{ObjectOutputStream}s. There are currently two
1399 different protocols, specified by @code{PROTOCOL_VERSION_1}
1400 and @code{PROTOCOL_VERSION_2}. The default default is
1401 @code{PROTOCOL_VERSION_1}.
1403 @deftypemethod ObjectOutputStream {protected void} annotateClass (java.lang.Class@w{ }@var{cl}) @*throws IOException
1404 An empty hook that allows subclasses to write extra information
1405 about classes to the stream. This method is called the first
1406 time each class is seen, and after all of the standard
1407 information about the class has been written.
1409 @deftypemethod ObjectOutputStream {protected Object} replaceObject (java.lang.Object@w{ }@var{obj}) @*throws IOException
1410 Allows subclasses to replace objects that are written to the
1411 stream with other objects to be written in their place. This
1412 method is called the first time each object is encountered
1413 (modulo reseting of the stream).
1415 This method must be enabled before it will be called in the
1416 serialization process.
1418 @deftypemethod ObjectOutputStream {protected boolean} enableReplaceObject (boolean@w{ }@var{enable}) @*throws SecurityException
1419 If @code{enable} is @code{true} and this object is
1420 trusted, then @code{replaceObject (Object)} will be called
1421 in subsequent calls to @code{writeObject (Object)}.
1422 Otherwise, @code{replaceObject (Object)} will not be called.
1424 @deftypemethod ObjectOutputStream {protected void} writeStreamHeader () @*throws IOException
1425 Writes stream magic and stream version information to the
1428 @deftypemethod ObjectOutputStream {protected void} writeObjectOverride (java.lang.Object@w{ }@var{obj}) @*throws NotActiveException, IOException
1429 This method allows subclasses to override the default
1430 serialization mechanism provided by
1431 @code{ObjectOutputStream}. To make this method be used for
1432 writing objects, subclasses must invoke the 0-argument
1433 constructor on this class from there constructor.
1435 @deftypemethod ObjectOutputStream {public void} write (int@w{ }@var{data}) @*throws IOException
1438 @deftypemethod ObjectOutputStream {public void} write (byte[]@w{ }@var{b}) @*throws IOException
1441 @deftypemethod ObjectOutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1444 @deftypemethod ObjectOutputStream {public void} flush () @*throws IOException
1447 @deftypemethod ObjectOutputStream {protected void} drain () @*throws IOException
1448 Causes the block-data buffer to be written to the underlying
1449 stream, but does not flush underlying stream.
1451 @deftypemethod ObjectOutputStream {public void} close () @*throws IOException
1454 @deftypemethod ObjectOutputStream {public void} writeBoolean (boolean@w{ }@var{data}) @*throws IOException
1457 @deftypemethod ObjectOutputStream {public void} writeByte (int@w{ }@var{data}) @*throws IOException
1460 @deftypemethod ObjectOutputStream {public void} writeShort (int@w{ }@var{data}) @*throws IOException
1463 @deftypemethod ObjectOutputStream {public void} writeChar (int@w{ }@var{data}) @*throws IOException
1466 @deftypemethod ObjectOutputStream {public void} writeInt (int@w{ }@var{data}) @*throws IOException
1469 @deftypemethod ObjectOutputStream {public void} writeLong (long@w{ }@var{data}) @*throws IOException
1472 @deftypemethod ObjectOutputStream {public void} writeFloat (float@w{ }@var{data}) @*throws IOException
1475 @deftypemethod ObjectOutputStream {public void} writeDouble (double@w{ }@var{data}) @*throws IOException
1478 @deftypemethod ObjectOutputStream {public void} writeBytes (java.lang.String@w{ }@var{data}) @*throws IOException
1481 @deftypemethod ObjectOutputStream {public void} writeChars (java.lang.String@w{ }@var{data}) @*throws IOException
1484 @deftypemethod ObjectOutputStream {public void} writeUTF (java.lang.String@w{ }@var{data}) @*throws IOException
1487 @deftypemethod ObjectOutputStream {public ObjectOutputStream.PutField} putFields () @*throws IOException
1490 @deftypemethod ObjectOutputStream {public void} writeFields () @*throws IOException
1493 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, boolean@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1496 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, byte@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1499 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, char@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1502 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, double@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1505 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, float@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1508 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, int@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1511 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, long@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1514 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, short@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1517 @deftypemethod ObjectOutputStream.PutField {public abstract void} put (java.lang.String@w{ }@var{name}, java.lang.Object@w{ }@var{value}) @*throws IOException, IllegalArgumentException
1520 @deftypemethod ObjectOutputStream.PutField {public abstract void} write (java.io.ObjectOutput@w{ }@var{out}) @*throws IOException
1523 @deftypemethod ObjectStreamClass {public static ObjectStreamClass} lookup (java.lang.Class@w{ }@var{cl})
1524 Returns the @code{ObjectStreamClass} for @code{cl}.
1525 If @code{cl} is null, or is not @code{Serializable},
1526 null is returned. @code{ObjectStreamClass}'s are memorized;
1527 later calls to this method with the same class will return the
1528 same @code{ObjectStreamClass} object and no recalculation
1531 @deftypemethod ObjectStreamClass {public String} getName ()
1532 Returns the name of the class that this
1533 @code{ObjectStreamClass} represents.
1535 @deftypemethod ObjectStreamClass {public Class} forClass ()
1536 Returns the class that this @code{ObjectStreamClass}
1537 represents. Null could be returned if this
1538 @code{ObjectStreamClass} was read from an
1539 @code{ObjectInputStream} and the class it represents cannot
1542 @deftypemethod ObjectStreamClass {public long} getSerialVersionUID ()
1543 Returns the serial version stream-unique identifier for the class
1544 represented by this @code{ObjectStreamClass}. This SUID is
1545 either defined by the class as @code{static final long
1546 serialVersionUID} or is calculated as specified in
1547 Javasoft's "Object Serialization Specification" XXX: add reference
1549 @deftypemethod ObjectStreamClass {public ObjectStreamField} getFields ()
1552 @deftypemethod ObjectStreamClass {public ObjectStreamField} getField (java.lang.String@w{ }@var{name})
1555 @deftypemethod ObjectStreamClass {public String} toString ()
1556 Returns a textual representation of this
1557 @code{ObjectStreamClass} object including the name of the
1558 class it represents as well as that class's serial version
1559 stream-unique identifier.
1561 @deftypemethod ObjectStreamField {public String} getName ()
1564 @deftypemethod ObjectStreamField {public Class} getType ()
1567 @deftypemethod ObjectStreamField {public char} getTypeCode ()
1570 @deftypemethod ObjectStreamField {public String} getTypeString ()
1573 @deftypemethod ObjectStreamField {public int} getOffset ()
1576 @deftypemethod ObjectStreamField {protected void} setOffset (int@w{ }@var{off})
1579 @deftypemethod ObjectStreamField {public boolean} isPrimitive ()
1582 @deftypemethod ObjectStreamField {public int} compareTo (java.lang.Object@w{ }@var{o})
1585 @deftypemethod ObjectStreamField {public String} toString ()
1588 @deftypemethod OutputStream {public abstract void} write (int@w{ }@var{b}) @*throws IOException
1591 @deftypemethod OutputStream {public void} write (byte[]@w{ }@var{b}) @*throws IOException, NullPointerException
1594 @deftypemethod OutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException, NullPointerException, IndexOutOfBoundsException
1597 @deftypemethod OutputStream {public void} flush () @*throws IOException
1600 @deftypemethod OutputStream {public void} close () @*throws IOException
1603 @deftypemethod OutputStreamWriter {public String} getEncoding ()
1606 @deftypemethod OutputStreamWriter {public void} close () @*throws IOException
1609 @deftypemethod OutputStreamWriter {public void} flush () @*throws IOException
1612 @deftypemethod OutputStreamWriter {public void} write (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
1615 @deftypemethod OutputStreamWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
1618 @deftypemethod OutputStreamWriter {public void} write (int@w{ }@var{ch}) @*throws IOException
1621 @deftypemethod PipedInputStream {public void} connect (java.io.PipedOutputStream@w{ }@var{source}) @*throws IOException
1622 This method connects this stream to the passed in @code{PipedOutputStream}.
1623 This stream is then ready for reading. If this stream is already
1624 connected or has been previously closed, then an exception is thrown
1626 @deftypemethod PipedInputStream {protected synchronized void} receive (int@w{ }@var{b}) @*throws IOException
1627 This method receives a byte of input from the source PipedOutputStream.
1628 If the internal circular buffer is full, this method blocks.
1630 @deftypemethod PipedInputStream {public int} read () @*throws IOException
1631 This method reads bytes from the stream into a caller supplied buffer.
1632 It starts storing bytes at position @code{offset} into the buffer and
1633 reads a maximum of @code{len} bytes. Note that this method can actually
1634 read fewer than @code{len} bytes. The actual number of bytes read is
1635 returned. A -1 is returned to indicated that no bytes can be read
1636 because the end of the stream was reached. If the stream is already
1637 closed, a -1 will again be returned to indicate the end of the stream.
1641 This method will block if no bytes are available to be read.
1643 @deftypemethod PipedInputStream {public synchronized int} read (byte[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
1644 This method reads bytes from the stream into a caller supplied buffer.
1645 It starts storing bytes at position @code{offset} into the buffer and
1646 reads a maximum of @code{len} bytes. Note that this method can actually
1647 read fewer than @code{len} bytes. The actual number of bytes read is
1648 returned. A -1 is returned to indicated that no bytes can be read
1649 because the end of the stream was reached - ie close() was called on the
1650 connected PipedOutputStream.
1654 This method will block if no bytes are available to be read.
1656 @deftypemethod PipedInputStream {public synchronized int} available () @*throws IOException
1657 This method returns the number of bytes that can be read from this stream
1658 before blocking could occur. This is the number of bytes that are
1659 currently unread in the internal circular buffer. Note that once this
1660 many additional bytes are read, the stream may block on a subsequent
1661 read, but it not guaranteed to block.
1663 @deftypemethod PipedInputStream {public synchronized void} close () @*throws IOException
1664 This methods closes the stream so that no more data can be read
1667 @deftypemethod PipedOutputStream {public void} connect (java.io.PipedInputStream@w{ }@var{sink}) @*throws IOException
1668 Connects this object to the specified @code{PipedInputStream}
1669 object. This stream will then be ready for writing.
1671 @deftypemethod PipedOutputStream {public void} write (int@w{ }@var{b}) @*throws IOException
1672 Write a single byte of date to the stream. Note that this method will
1673 block if the @code{PipedInputStream} to which this object is
1674 connected has a full buffer.
1676 @deftypemethod PipedOutputStream {public void} write (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1677 This method writes @code{len} bytes of data from the byte array
1678 @code{buf} starting at index @code{offset} in the array
1679 to the stream. Note that this method will block if the
1680 @code{PipedInputStream} to which this object is connected has
1681 a buffer that cannot hold all of the bytes to be written.
1683 @deftypemethod PipedOutputStream {public void} flush ()
1684 This method does nothing.
1686 @deftypemethod PipedOutputStream {public void} close ()
1687 This method closes this stream so that no more data can be written
1688 to it. Any further attempts to write to this stream may throw an
1691 @deftypemethod PipedReader {public void} connect (java.io.PipedWriter@w{ }@var{source}) @*throws IOException
1692 This method connects this stream to the passed in @code{PipedWriter}.
1693 This stream is then ready for reading. If this stream is already
1694 connected or has been previously closed, then an exception is thrown
1696 @deftypemethod PipedReader {public int} read () @*throws IOException
1697 This method reads chars from the stream into a caller supplied buffer.
1698 It starts storing chars at position @code{offset} into the buffer and
1699 reads a maximum of @code{len} chars. Note that this method can actually
1700 read fewer than @code{len} chars. The actual number of chars read is
1701 returned. A -1 is returned to indicated that no chars can be read
1702 because the end of the stream was reached. If the stream is already
1703 closed, a -1 will again be returned to indicate the end of the stream.
1707 This method will block if no chars are available to be read.
1709 @deftypemethod PipedReader {public int} read (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
1710 This method reads characters from the stream into a caller supplied buffer.
1711 It starts storing chars at position @code{offset} into the buffer and
1712 reads a maximum of @code{len} chars. Note that this method can actually
1713 read fewer than @code{len} chars. The actual number of chars read is
1714 returned. A -1 is returned to indicated that no chars can be read
1715 because the end of the stream was reached - ie close() was called on the
1716 connected PipedWriter.
1720 This method will block if no chars are available to be read.
1722 @deftypemethod PipedReader {public boolean} ready () @*throws IOException
1725 @deftypemethod PipedReader {public void} close () @*throws IOException
1726 This methods closes the stream so that no more data can be read
1729 @deftypemethod PipedWriter {public void} connect (java.io.PipedReader@w{ }@var{sink}) @*throws IOException
1730 Connects this object to the specified @code{PipedReader}
1731 object. This stream will then be ready for writing.
1733 @deftypemethod PipedWriter {public void} write (char@w{ }@var{b}) @*throws IOException
1734 Write a single char of date to the stream. Note that this method will
1735 block if the @code{PipedReader} to which this object is
1736 connected has a full buffer.
1738 @deftypemethod PipedWriter {public void} write (char[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1739 This method writes @code{len} chars of data from the char array
1740 @code{buf} starting at index @code{offset} in the array
1741 to the stream. Note that this method will block if the
1742 @code{PipedReader} to which this object is connected has
1743 a buffer that cannot hold all of the chars to be written.
1745 @deftypemethod PipedWriter {public void} flush ()
1746 This method does nothing.
1748 @deftypemethod PipedWriter {public void} close ()
1749 This method closes this stream so that no more data can be written
1750 to it. Any further attempts to write to this stream may throw an
1753 @deftypemethod PrintStream {public boolean} checkError ()
1756 @deftypemethod PrintStream {public void} close ()
1759 @deftypemethod PrintStream {public void} flush ()
1762 @deftypemethod PrintStream {public void} print (boolean@w{ }@var{bool})
1765 @deftypemethod PrintStream {public void} print (int@w{ }@var{inum})
1768 @deftypemethod PrintStream {public void} print (long@w{ }@var{lnum})
1771 @deftypemethod PrintStream {public void} print (float@w{ }@var{fnum})
1774 @deftypemethod PrintStream {public void} print (double@w{ }@var{dnum})
1777 @deftypemethod PrintStream {public void} print (java.lang.Object@w{ }@var{obj})
1780 @deftypemethod PrintStream {public void} print (java.lang.String@w{ }@var{str})
1783 @deftypemethod PrintStream {public synchronized void} print (char@w{ }@var{ch})
1786 @deftypemethod PrintStream {public void} print (char[]@w{ }@var{charArray})
1789 @deftypemethod PrintStream {public void} println ()
1792 @deftypemethod PrintStream {public void} println (boolean@w{ }@var{bool})
1795 @deftypemethod PrintStream {public void} println (int@w{ }@var{inum})
1798 @deftypemethod PrintStream {public void} println (long@w{ }@var{lnum})
1801 @deftypemethod PrintStream {public void} println (float@w{ }@var{fnum})
1804 @deftypemethod PrintStream {public void} println (double@w{ }@var{dnum})
1807 @deftypemethod PrintStream {public void} println (java.lang.Object@w{ }@var{obj})
1810 @deftypemethod PrintStream {public void} println (java.lang.String@w{ }@var{str})
1813 @deftypemethod PrintStream {public synchronized void} println (char@w{ }@var{ch})
1816 @deftypemethod PrintStream {public void} println (char[]@w{ }@var{charArray})
1819 @deftypemethod PrintStream {protected void} setError ()
1822 @deftypemethod PrintStream {public void} write (int@w{ }@var{oneByte})
1825 @deftypemethod PrintStream {public void} write (byte[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{count})
1828 @deftypemethod PrintWriter {protected void} setError ()
1829 This method can be called by subclasses to indicate that an error
1830 has occurred and should be reported by @code{checkError}.
1832 @deftypemethod PrintWriter {public boolean} checkError ()
1833 This method checks to see if an error has occurred on this stream. Note
1834 that once an error has occurred, this method will continue to report
1835 @code{true} forever for this stream. Before checking for an
1836 error condition, this method flushes the stream.
1838 @deftypemethod PrintWriter {public void} flush ()
1839 This method flushes any buffered chars to the underlying stream and
1840 then flushes that stream as well.
1842 @deftypemethod PrintWriter {public void} close ()
1843 This method closes this stream and all underlying streams.
1845 @deftypemethod PrintWriter {public void} print (java.lang.String@w{ }@var{str})
1846 This method prints a @code{String} to the stream. The actual
1847 value printed depends on the system default encoding.
1849 @deftypemethod PrintWriter {public void} print (char@w{ }@var{ch})
1850 This method prints a char to the stream. The actual value printed is
1851 determined by the character encoding in use.
1853 @deftypemethod PrintWriter {public void} print (char[]@w{ }@var{charArray})
1854 This method prints an array of characters to the stream. The actual
1855 value printed depends on the system default encoding.
1857 @deftypemethod PrintWriter {public void} print (boolean@w{ }@var{bool})
1858 This methods prints a boolean value to the stream. @code{true}
1859 values are printed as "true" and @code{false} values are printed
1862 @deftypemethod PrintWriter {public void} print (int@w{ }@var{inum})
1863 This method prints an integer to the stream. The value printed is
1864 determined using the @code{String.valueOf()} method.
1866 @deftypemethod PrintWriter {public void} print (long@w{ }@var{lnum})
1867 This method prints a long to the stream. The value printed is
1868 determined using the @code{String.valueOf()} method.
1870 @deftypemethod PrintWriter {public void} print (float@w{ }@var{fnum})
1871 This method prints a float to the stream. The value printed is
1872 determined using the @code{String.valueOf()} method.
1874 @deftypemethod PrintWriter {public void} print (double@w{ }@var{dnum})
1875 This method prints a double to the stream. The value printed is
1876 determined using the @code{String.valueOf()} method.
1878 @deftypemethod PrintWriter {public void} print (java.lang.Object@w{ }@var{obj})
1879 This method prints an @code{Object} to the stream. The actual
1880 value printed is determined by calling the @code{String.valueOf()}
1883 @deftypemethod PrintWriter {public void} println ()
1884 This method prints a line separator sequence to the stream. The value
1885 printed is determined by the system property <xmp>line.separator</xmp>
1886 and is not necessarily the Unix '\n' newline character.
1888 @deftypemethod PrintWriter {public void} println (boolean@w{ }@var{bool})
1889 This methods prints a boolean value to the stream. @code{true}
1890 values are printed as "true" and @code{false} values are printed
1893 This method prints a line termination sequence after printing the value.
1895 @deftypemethod PrintWriter {public void} println (int@w{ }@var{inum})
1896 This method prints an integer to the stream. The value printed is
1897 determined using the @code{String.valueOf()} method.
1899 This method prints a line termination sequence after printing the value.
1901 @deftypemethod PrintWriter {public void} println (long@w{ }@var{lnum})
1902 This method prints a long to the stream. The value printed is
1903 determined using the @code{String.valueOf()} method.
1905 This method prints a line termination sequence after printing the value.
1907 @deftypemethod PrintWriter {public void} println (float@w{ }@var{fnum})
1908 This method prints a float to the stream. The value printed is
1909 determined using the @code{String.valueOf()} method.
1911 This method prints a line termination sequence after printing the value.
1913 @deftypemethod PrintWriter {public void} println (double@w{ }@var{dnum})
1914 This method prints a double to the stream. The value printed is
1915 determined using the @code{String.valueOf()} method.
1917 This method prints a line termination sequence after printing the value.
1919 @deftypemethod PrintWriter {public void} println (java.lang.Object@w{ }@var{obj})
1920 This method prints an @code{Object} to the stream. The actual
1921 value printed is determined by calling the @code{String.valueOf()}
1924 This method prints a line termination sequence after printing the value.
1926 @deftypemethod PrintWriter {public void} println (java.lang.String@w{ }@var{str})
1927 This method prints a @code{String} to the stream. The actual
1928 value printed depends on the system default encoding.
1930 This method prints a line termination sequence after printing the value.
1932 @deftypemethod PrintWriter {public void} println (char@w{ }@var{ch})
1933 This method prints a char to the stream. The actual value printed is
1934 determined by the character encoding in use.
1936 This method prints a line termination sequence after printing the value.
1938 @deftypemethod PrintWriter {public void} println (char[]@w{ }@var{charArray})
1939 This method prints an array of characters to the stream. The actual
1940 value printed depends on the system default encoding.
1942 This method prints a line termination sequence after printing the value.
1944 @deftypemethod PrintWriter {public void} write (int@w{ }@var{ch})
1945 This method writes a single char to the stream.
1947 @deftypemethod PrintWriter {public void} write (char[]@w{ }@var{charArray}, int@w{ }@var{offset}, int@w{ }@var{count})
1948 This method writes @code{count} chars from the specified array
1949 starting at index @code{offset} into the array.
1951 @deftypemethod PrintWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{count})
1952 This method writes @code{count} chars from the specified
1953 @code{String} to the output starting at character position
1954 @code{offset} into the @code{String}
1956 @deftypemethod PrintWriter {public void} write (char[]@w{ }@var{charArray})
1957 This method write all the chars in the specified array to the output.
1959 @deftypemethod PrintWriter {public void} write (java.lang.String@w{ }@var{str})
1960 This method writes the contents of the specified @code{String}
1961 to the underlying stream.
1963 @deftypemethod PushbackInputStream {public int} available () @*throws IOException
1966 @deftypemethod PushbackInputStream {public void} close () @*throws IOException
1969 @deftypemethod PushbackInputStream {public boolean} markSupported ()
1972 @deftypemethod PushbackInputStream {public int} read () @*throws IOException
1975 @deftypemethod PushbackInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1978 @deftypemethod PushbackInputStream {public void} unread (int@w{ }@var{b}) @*throws IOException
1981 @deftypemethod PushbackInputStream {public void} unread (byte[]@w{ }@var{b}) @*throws IOException
1984 @deftypemethod PushbackInputStream {public void} unread (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
1987 @deftypemethod PushbackInputStream {public long} skip (long@w{ }@var{n}) @*throws IOException
1990 @deftypemethod PushbackReader {public void} close () @*throws IOException
1991 This method closes the stream and frees any associated resources.
1993 @deftypemethod PushbackReader {public void} mark (int@w{ }@var{read_limit}) @*throws IOException
1994 This method throws an exception when called since this class does
1995 not support mark/reset.
1997 @deftypemethod PushbackReader {public boolean} markSupported ()
1998 This method returns @code{false} to indicate that it does not support
1999 mark/reset functionality.
2001 @deftypemethod PushbackReader {public void} reset () @*throws IOException
2002 This method always throws an IOException in this class because
2003 mark/reset functionality is not supported.
2005 @deftypemethod PushbackReader {public boolean} ready () @*throws IOException
2006 This method determines whether or not this stream is ready to be read.
2007 If it returns @code{false} to indicate that the stream is not
2008 ready, any attempt to read from the stream could (but is not
2009 guaranteed to) block.
2013 This stream is ready to read if there are either chars waiting to be
2014 read in the pushback buffer or if the underlying stream is ready to
2017 @deftypemethod PushbackReader {public long} skip (long@w{ }@var{num_chars}) @*throws IOException
2018 This method skips the specified number of chars in the stream. It
2019 returns the actual number of chars skipped, which may be less than the
2024 This method first discards chars from the buffer, then calls the
2025 @code{skip} method on the underlying @code{Reader} to
2026 skip additional chars if necessary.
2028 @deftypemethod PushbackReader {public int} read () @*throws IOException
2029 This method reads an unsigned char from the input stream and returns it
2030 as an int in the range of 0-65535. This method also will return -1 if
2031 the end of the stream has been reached. The char returned will be read
2032 from the pushback buffer, unless the buffer is empty, in which case
2033 the char will be read from the underlying stream.
2037 This method will block until the char can be read.
2039 @deftypemethod PushbackReader {public synchronized int} read (char[]@w{ }@var{b}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
2040 This method read chars from a stream and stores them into a caller
2041 supplied buffer. It starts storing the data at index @code{offset} into
2042 the buffer and attempts to read @code{len} chars. This method can
2043 return before reading the number of chars requested. The actual number
2044 of chars read is returned as an int. A -1 is returned to indicate the
2049 This method will block until some data can be read.
2053 This method first reads chars from the pushback buffer in order to
2054 satisfy the read request. If the pushback buffer cannot provide all
2055 of the chars requested, the remaining chars are read from the
2058 @deftypemethod PushbackReader {public void} unread (int@w{ }@var{b}) @*throws IOException
2059 This method pushes a single char of data into the pushback buffer.
2060 The char pushed back is the one that will be returned as the first char
2065 If the pushback buffer is full, this method throws an exception.
2069 The argument to this method is an @code{int}. Only the low eight bits
2070 of this value are pushed back.
2072 @deftypemethod PushbackReader {public synchronized void} unread (char[]@w{ }@var{buf}) @*throws IOException
2073 This method pushes all of the chars in the passed char array into
2074 the pushback buffer. These chars are pushed in reverse order so that
2075 the next char read from the stream after this operation will be
2076 @code{buf[0]} followed by @code{buf[1]}, etc.
2080 If the pushback buffer cannot hold all of the requested chars, an
2081 exception is thrown.
2083 @deftypemethod PushbackReader {public synchronized void} unread (char[]@w{ }@var{b}, int@w{ }@var{offset}, int@w{ }@var{len}) @*throws IOException
2084 This method pushed back chars from the passed in array into the pushback
2085 buffer. The chars from @code{buf[offset]} to @code{buf[offset + len]}
2086 are pushed in reverse order so that the next char read from the stream
2087 after this operation will be @code{buf[offset]} followed by
2088 @code{buf[offset + 1]}, etc.
2092 If the pushback buffer cannot hold all of the requested chars, an
2093 exception is thrown.
2095 @deftypemethod RandomAccessFile {public void} close () @*throws IOException
2098 @deftypemethod RandomAccessFile {public final FileDescriptor} getFD () @*throws IOException
2101 @deftypemethod RandomAccessFile {public long} getFilePointer () @*throws IOException
2104 @deftypemethod RandomAccessFile {public long} length () @*throws IOException
2107 @deftypemethod RandomAccessFile {public int} read () @*throws IOException
2110 @deftypemethod RandomAccessFile {public int} read (byte[]@w{ }@var{buffer}) @*throws IOException
2113 @deftypemethod RandomAccessFile {public int} read (byte[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2116 @deftypemethod RandomAccessFile {public final boolean} readBoolean () @*throws IOException
2119 @deftypemethod RandomAccessFile {public final byte} readByte () @*throws IOException
2122 @deftypemethod RandomAccessFile {public final char} readChar () @*throws IOException
2125 @deftypemethod RandomAccessFile {public final double} readDouble () @*throws IOException
2128 @deftypemethod RandomAccessFile {public final float} readFloat () @*throws IOException
2131 @deftypemethod RandomAccessFile {public final void} readFully (byte[]@w{ }@var{buffer}) @*throws IOException
2134 @deftypemethod RandomAccessFile {public final void} readFully (byte[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2137 @deftypemethod RandomAccessFile {public final int} readInt () @*throws IOException
2140 @deftypemethod RandomAccessFile {public final String} readLine () @*throws IOException
2143 @deftypemethod RandomAccessFile {public final long} readLong () @*throws IOException
2146 @deftypemethod RandomAccessFile {public final short} readShort () @*throws IOException
2149 @deftypemethod RandomAccessFile {public final int} readUnsignedByte () @*throws IOException
2152 @deftypemethod RandomAccessFile {public final int} readUnsignedShort () @*throws IOException
2155 @deftypemethod RandomAccessFile {public final String} readUTF () @*throws IOException
2158 @deftypemethod RandomAccessFile {public void} seek (long@w{ }@var{pos}) @*throws IOException
2161 @deftypemethod RandomAccessFile {public int} skipBytes (int@w{ }@var{count}) @*throws IOException
2164 @deftypemethod RandomAccessFile {public void} write (int@w{ }@var{oneByte}) @*throws IOException
2167 @deftypemethod RandomAccessFile {public void} write (byte[]@w{ }@var{buffer}) @*throws IOException
2170 @deftypemethod RandomAccessFile {public void} write (byte[]@w{ }@var{buffer}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2173 @deftypemethod RandomAccessFile {public final void} writeBoolean (boolean@w{ }@var{val}) @*throws IOException
2176 @deftypemethod RandomAccessFile {public final void} writeByte (int@w{ }@var{v}) @*throws IOException
2179 @deftypemethod RandomAccessFile {public final void} writeShort (int@w{ }@var{v}) @*throws IOException
2182 @deftypemethod RandomAccessFile {public final void} writeChar (int@w{ }@var{v}) @*throws IOException
2185 @deftypemethod RandomAccessFile {public final void} writeInt (int@w{ }@var{v}) @*throws IOException
2188 @deftypemethod RandomAccessFile {public final void} writeLong (long@w{ }@var{v}) @*throws IOException
2191 @deftypemethod RandomAccessFile {public final void} writeFloat (float@w{ }@var{v}) @*throws IOException
2194 @deftypemethod RandomAccessFile {public final void} writeDouble (double@w{ }@var{v}) @*throws IOException
2197 @deftypemethod RandomAccessFile {public final void} writeBytes (java.lang.String@w{ }@var{s}) @*throws IOException
2200 @deftypemethod RandomAccessFile {public final void} writeChars (java.lang.String@w{ }@var{s}) @*throws IOException
2203 @deftypemethod RandomAccessFile {public final void} writeUTF (java.lang.String@w{ }@var{s}) @*throws IOException
2206 @deftypemethod Reader {public abstract int} read (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2207 Read chars from a stream and stores them into a caller
2208 supplied buffer. It starts storing the data at index @code{offset}
2209 into the buffer and attempts to read @code{len} chars. This method
2210 can return before reading the number of chars requested. The actual
2211 number of chars read is returned as an int. A -1 is returned to indicate
2212 the end of the stream.
2216 This method will block until some data can be read.
2220 This method operates by calling the single char @code{read()} method
2221 in a loop until the desired number of chars are read. The read loop
2222 stops short if the end of the stream is encountered or if an IOException
2223 is encountered on any read operation except the first. If the first
2224 attempt to read a chars fails, the IOException is allowed to propagate
2225 upward. And subsequent IOException is caught and treated identically
2226 to an end of stream condition. Subclasses can (and should if possible)
2227 override this method to provide a more efficient implementation.
2229 @deftypemethod Reader {public int} read (char[]@w{ }@var{buf}) @*throws IOException
2230 Reads chars from a stream and stores them into a caller
2231 supplied buffer. This method attempts to completely fill the buffer,
2232 but can return before doing so. The actual number of chars read is
2233 returned as an int. A -1 is returned to indicate the end of the stream.
2237 This method will block until some data can be read.
2241 This method operates by calling an overloaded read method like so:
2242 @code{read(buf, 0, buf.length)}
2244 @deftypemethod Reader {public int} read () @*throws IOException
2245 Reads an char from the input stream and returns it
2246 as an int in the range of 0-65535. This method also will return -1 if
2247 the end of the stream has been reached.
2251 This method will block until the char can be read.
2253 @deftypemethod Reader {public abstract void} close () @*throws IOException
2254 Closes the stream. Any futher attempts to read from the
2255 stream may generate an @code{IOException}.
2257 @deftypemethod Reader {public boolean} markSupported ()
2258 Returns a boolean that indicates whether the mark/reset
2259 methods are supported in this class. Those methods can be used to
2260 remember a specific point in the stream and reset the stream to that
2265 This method always returns @code{false} in this class, but
2266 subclasses can override this method to return @code{true} if they
2267 support mark/reset functionality.
2269 @deftypemethod Reader {public void} mark (int@w{ }@var{readLimit}) @*throws IOException
2270 Marks a position in the input to which the stream can be
2271 "reset" by calling the @code{reset()} method. The parameter
2272 @code{readlimit} is the number of chars that can be read from the
2273 stream after setting the mark before the mark becomes invalid. For
2274 example, if @code{mark()} is called with a read limit of 10, then
2275 when 11 chars of data are read from the stream before the
2276 @code{reset()} method is called, then the mark is invalid and the
2277 stream object instance is not required to remember the mark.
2279 @deftypemethod Reader {public void} reset () @*throws IOException
2280 Resets a stream to the point where the @code{mark()}
2281 method was called. Any chars that were read after the mark point was
2282 set will be re-read during subsequent reads.
2286 This method always throws an IOException in this class, but subclasses
2287 can override this method if they provide mark/reset functionality.
2289 @deftypemethod Reader {public boolean} ready () @*throws IOException
2290 Determines whether or not this stream is ready to be
2291 read. If it returns @code{false} the stream may block if a
2292 read is attempted, but it is not guaranteed to do so.
2296 This method always returns @code{false} in this class
2298 @deftypemethod Reader {public long} skip (long@w{ }@var{count}) @*throws IOException
2299 Skips the specified number of chars in the stream. It
2300 returns the actual number of chars skipped, which may be less than the
2305 This method reads and discards chars into a 256 char array until the
2306 specified number of chars were skipped or until either the end of stream
2307 is reached or a read attempt returns a short count. Subclasses can
2308 override this method to provide a more efficient implementation where
2311 @deftypemethod SequenceInputStream {public int} available () @*throws IOException
2314 @deftypemethod SequenceInputStream {public void} close () @*throws IOException
2317 @deftypemethod SequenceInputStream {public int} read () @*throws IOException
2320 @deftypemethod SequenceInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
2323 @deftypemethod StreamTokenizer {public void} commentChar (int@w{ }@var{ch})
2324 This method sets the comment attribute on the specified character.
2326 @deftypemethod StreamTokenizer {public void} eolIsSignificant (boolean@w{ }@var{flag})
2327 This method sets a flag that indicates whether or not the end of line
2328 sequence terminates and is a token. The defaults to @code{false}
2330 @deftypemethod StreamTokenizer {public int} lineno ()
2331 This method returns the current line number. Note that if the
2332 @code{pushBack()} method is called, it has no effect on the
2333 line number returned by this method.
2335 @deftypemethod StreamTokenizer {public void} lowerCaseMode (boolean@w{ }@var{flag})
2336 This method sets a flag that indicates whether or not alphabetic
2337 tokens that are returned should be converted to lower case.
2339 @deftypemethod StreamTokenizer {public int} nextToken () @*throws IOException
2340 This method reads the next token from the stream. It sets the
2341 @code{ttype} variable to the appropriate token type and
2342 returns it. It also can set @code{sval} or @code{nval}
2343 as described below. The parsing strategy is as follows:
2349 Skip any whitespace characters.
2352 If a numeric character is encountered, attempt to parse a numeric
2353 value. Leading '-' characters indicate a numeric only if followed by
2354 another non-'-' numeric. The value of the numeric token is terminated
2355 by either the first non-numeric encountered, or the second occurrence of
2356 '-' or '.'. The token type returned is TT_NUMBER and @code{nval}
2357 is set to the value parsed.
2360 If an alphabetic character is parsed, all subsequent characters
2361 are read until the first non-alphabetic or non-numeric character is
2362 encountered. The token type returned is TT_WORD and the value parsed
2363 is stored in @code{sval}. If lower case mode is set, the token
2364 stored in @code{sval} is converted to lower case. The end of line
2365 sequence terminates a word only if EOL signficance has been turned on.
2366 The start of a comment also terminates a word. Any character with a
2367 non-alphabetic and non-numeric attribute (such as white space, a quote,
2368 or a commet) are treated as non-alphabetic and terminate the word.
2371 If a comment charcters is parsed, then all remaining characters on
2372 the current line are skipped and another token is parsed. Any EOL or
2373 EOF's encountered are not discarded, but rather terminate the comment.
2376 If a quote character is parsed, then all characters up to the
2377 second occurrence of the same quote character are parsed into a
2378 @code{String}. This @code{String} is stored as
2379 @code{sval}, but is not converted to lower case, even if lower case
2380 mode is enabled. The token type returned is the value of the quote
2381 character encountered. Any escape sequences
2382 (\b (backspace), \t (HTAB), \n (linefeed), \f (form feed), \r
2383 (carriage return), \" (double quote), \' (single quote), \\
2384 (backslash), \XXX (octal esacpe)) are converted to the appropriate
2385 char values. Invalid esacape sequences are left in untranslated.
2386 Unicode characters like ('\ u0000') are not recognized.
2389 If the C++ comment sequence "//" is encountered, and the parser
2390 is configured to handle that sequence, then the remainder of the line
2391 is skipped and another token is read exactly as if a character with
2392 the comment attribute was encountered.
2395 If the C comment sequence "/*" is encountered, and the parser
2396 is configured to handle that sequence, then all characters up to and
2397 including the comment terminator sequence are discarded and another
2401 If all cases above are not met, then the character is an ordinary
2402 character that is parsed as a token by itself. The char encountered
2403 is returned as the token type.
2408 @deftypemethod StreamTokenizer {public void} ordinaryChar (int@w{ }@var{ch})
2409 This method makes the specified character an ordinary character. This
2410 means that none of the attributes (whitespace, alphabetic, numeric,
2411 quote, or comment) will be set on this character. This character will
2412 parse as its own token.
2414 @deftypemethod StreamTokenizer {public void} ordinaryChars (int@w{ }@var{low}, int@w{ }@var{hi})
2415 This method makes all the characters in the specified range, range
2416 terminators included, ordinary. This means the none of the attributes
2417 (whitespace, alphabetic, numeric, quote, or comment) will be set on
2418 any of the characters in the range. This makes each character in this
2419 range parse as its own token.
2421 @deftypemethod StreamTokenizer {public void} parseNumbers ()
2422 This method sets the numeric attribute on the characters '0' - '9' and
2423 the characters '.' and '-'.
2425 @deftypemethod StreamTokenizer {public void} pushBack ()
2426 This method returns the current line number. Note that if the
2427 @code{pushBack()} method is called, it has no effect on the
2428 line number returned by this method.
2430 @deftypemethod StreamTokenizer {public void} quoteChar (int@w{ }@var{ch})
2431 This method sets the quote attribute on the specified character.
2433 @deftypemethod StreamTokenizer {public void} resetSyntax ()
2434 This method removes all attributes (whitespace, alphabetic, numeric,
2435 quote, and comment) from all characters. It is equivalent to calling
2436 @code{ordinaryChars(0x00, 0xFF)}.
2438 @deftypemethod StreamTokenizer {public void} slashSlashComments (boolean@w{ }@var{flag})
2439 This method sets a flag that indicates whether or not "C++" language style
2440 comments ("//" comments through EOL ) are handled by the parser.
2441 If this is @code{true} commented out sequences are skipped and
2442 ignored by the parser. This defaults to @code{false}.
2444 @deftypemethod StreamTokenizer {public void} slashStarComments (boolean@w{ }@var{flag})
2445 This method sets a flag that indicates whether or not "C" language style
2446 comments (with nesting not allowed) are handled by the parser.
2447 If this is @code{true} commented out sequences are skipped and
2448 ignored by the parser. This defaults to @code{false}.
2450 @deftypemethod StreamTokenizer {public String} toString ()
2451 This method returns the current token value as a @code{String} in
2452 the form "Token[x], line n", where 'n' is the current line numbers and
2453 'x' is determined as follows.
2462 If no token has been read, then 'x' is "NOTHING" and 'n' is 0
2465 If @code{ttype} is TT_EOF, then 'x' is "EOF"
2468 If @code{ttype} is TT_EOL, then 'x' is "EOL"
2471 If @code{ttype} is TT_WORD, then 'x' is @code{sval}
2474 If @code{ttype} is TT_NUMBER, then 'x' is "n=strnval" where
2475 'strnval' is @code{String.valueOf(nval)}.
2478 If @code{ttype} is a quote character, then 'x' is
2482 For all other cases, 'x' is @code{ttype}
2487 @deftypemethod StreamTokenizer {public void} whitespaceChars (int@w{ }@var{low}, int@w{ }@var{hi})
2488 This method sets the whitespace attribute for all charcters in the
2489 specified range, range terminators included.
2491 @deftypemethod StreamTokenizer {public void} wordChars (int@w{ }@var{low}, int@w{ }@var{hi})
2492 This method sets the alphabetic attribute for all charcters in the
2493 specified range, range terminators included.
2495 @deftypemethod StringBufferInputStream {public int} available ()
2498 @deftypemethod StringBufferInputStream {public int} read ()
2501 @deftypemethod StringBufferInputStream {public int} read (byte[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len})
2504 @deftypemethod StringBufferInputStream {public void} reset ()
2507 @deftypemethod StringBufferInputStream {public long} skip (long@w{ }@var{n})
2510 @deftypemethod StringReader {public void} close ()
2513 @deftypemethod StringReader {public void} mark (int@w{ }@var{readAheadLimit}) @*throws IOException
2516 @deftypemethod StringReader {public boolean} markSupported ()
2519 @deftypemethod StringReader {public int} read () @*throws IOException
2522 @deftypemethod StringReader {public int} read (char[]@w{ }@var{b}, int@w{ }@var{off}, int@w{ }@var{len}) @*throws IOException
2525 @deftypemethod StringReader {public boolean} ready () @*throws IOException
2526 This method determines if the stream is ready to be read. This class
2527 is always ready to read and so always returns @code{true}, unless
2528 close() has previously been called in which case an IOException is
2531 @deftypemethod StringReader {public void} reset () @*throws IOException
2532 Sets the read position in the stream to the previously
2533 marked position or to 0 (i.e., the beginning of the stream) if the mark
2534 has not already been set.
2536 @deftypemethod StringReader {public long} skip (long@w{ }@var{n}) @*throws IOException
2537 This method attempts to skip the requested number of chars in the
2538 input stream. It does this by advancing the @code{pos} value by
2539 the specified number of chars. It this would exceed the length of the
2540 buffer, then only enough chars are skipped to position the stream at
2541 the end of the buffer. The actual number of chars skipped is returned.
2543 @deftypemethod StringWriter {public void} close ()
2546 @deftypemethod StringWriter {public void} flush ()
2549 @deftypemethod StringWriter {public StringBuffer} getBuffer ()
2552 @deftypemethod StringWriter {public String} toString ()
2555 @deftypemethod StringWriter {public void} write (int@w{ }@var{oneChar})
2558 @deftypemethod StringWriter {public void} write (char[]@w{ }@var{chars}, int@w{ }@var{offset}, int@w{ }@var{len})
2561 @deftypemethod StringWriter {public void} write (java.lang.String@w{ }@var{str})
2564 @deftypemethod StringWriter {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{len})
2567 @deftypemethod WriteAbortedException {public String} getMessage ()
2568 This method returns a message indicating what went wrong, including
2569 the message text from the initial exception that caused this one to
2572 @deftypemethod Writer {public abstract void} close () @*throws IOException
2575 @deftypemethod Writer {public abstract void} flush () @*throws IOException
2578 @deftypemethod Writer {public abstract void} write (char[]@w{ }@var{buf}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2581 @deftypemethod Writer {public void} write (char[]@w{ }@var{buf}) @*throws IOException
2584 @deftypemethod Writer {public void} write (int@w{ }@var{ch}) @*throws IOException
2587 @deftypemethod Writer {public void} write (java.lang.String@w{ }@var{str}, int@w{ }@var{offset}, int@w{ }@var{count}) @*throws IOException
2590 @deftypemethod Writer {public void} write (java.lang.String@w{ }@var{str}) @*throws IOException