src/share/classes/java/io/DataInputStream.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * A data input stream lets an application read primitive Java data
  30  * types from an underlying input stream in a machine-independent
  31  * way. An application uses a data output stream to write data that
  32  * can later be read by a data input stream.
  33  * <p>
  34  * DataInputStream is not necessarily safe for multithreaded access.
  35  * Thread safety is optional and is the responsibility of users of
  36  * methods in this class.
  37  *
  38  * @author  Arthur van Hoff
  39  * @see     java.io.DataOutputStream
  40  * @since   JDK1.0
  41  */
  42 public
  43 class DataInputStream extends FilterInputStream implements DataInput {
  44 
  45     /**
  46      * Creates a DataInputStream that uses the specified
  47      * underlying InputStream.
  48      *
  49      * @param  in   the specified input stream
  50      */
  51     public DataInputStream(InputStream in) {
  52         super(in);
  53     }
  54 
  55     /**
  56      * working arrays initialized on demand by readUTF
  57      */
  58     private byte bytearr[] = new byte[80];
  59     private char chararr[] = new char[80];
  60 




  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * A data input stream lets an application read primitive Java data
  30  * types from an underlying input stream in a machine-independent
  31  * way. An application uses a data output stream to write data that
  32  * can later be read by a data input stream.
  33  * <p>
  34  * DataInputStream is not necessarily safe for multithreaded access.
  35  * Thread safety is optional and is the responsibility of users of
  36  * methods in this class.
  37  *
  38  * @author  Arthur van Hoff
  39  * @see     java.io.DataOutputStream
  40  * @since   1.0
  41  */
  42 public
  43 class DataInputStream extends FilterInputStream implements DataInput {
  44 
  45     /**
  46      * Creates a DataInputStream that uses the specified
  47      * underlying InputStream.
  48      *
  49      * @param  in   the specified input stream
  50      */
  51     public DataInputStream(InputStream in) {
  52         super(in);
  53     }
  54 
  55     /**
  56      * working arrays initialized on demand by readUTF
  57      */
  58     private byte bytearr[] = new byte[80];
  59     private char chararr[] = new char[80];
  60