/[classpath]/classpath/java/io/DataInput.java
ViewVC logotype

Diff of /classpath/java/io/DataInput.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by arenn, Sun Apr 6 20:43:57 2003 UTC revision 1.12 by arenn, Mon Apr 7 19:45:21 2003 UTC
# Line 68  public interface DataInput Line 68  public interface DataInput
68     * @exception EOFException If end of file is reached before     * @exception EOFException If end of file is reached before
69     * reading the boolean     * reading the boolean
70     * @exception IOException If any other error occurs     * @exception IOException If any other error occurs
71       *
72       * @see DataOutput#writeBoolean
73     */     */
74    boolean readBoolean() throws EOFException, IOException;    boolean readBoolean() throws EOFException, IOException;
75    
# Line 84  public interface DataInput Line 86  public interface DataInput
86     * @exception EOFException If end of file is reached before reading the byte     * @exception EOFException If end of file is reached before reading the byte
87     * @exception IOException If any other error occurs     * @exception IOException If any other error occurs
88     *     *
89     * @see DataOutput#writeBoolean     * @see DataOutput#writeByte
90     */     */
91    byte readByte() throws EOFException, IOException;    byte readByte() throws EOFException, IOException;
92    
# Line 143  public interface DataInput Line 145  public interface DataInput
145     * first and second byte read from the stream respectively, they will be     * first and second byte read from the stream respectively, they will be
146     * transformed to a <code>short</code> in the following manner:     * transformed to a <code>short</code> in the following manner:
147     * <p>     * <p>
148     * <code>(short)((byte1 << 8) + (byte2 & 0xFF))</code>     * <code>(short)(((byte1 & 0xFF) << 8) + (byte2 & 0xFF))</code>
149     * <p>     * <p>
150     * The value returned is in the range of -32768 to 32767.     * The value returned is in the range of -32768 to 32767.
151     * <p>     * <p>
# Line 234  public interface DataInput Line 236  public interface DataInput
236     * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) +     * <code>(long)(((byte1 & 0xFF) << 56) + ((byte2 & 0xFF) << 48) +
237     * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) +     * ((byte3 & 0xFF) << 40) + ((byte4 & 0xFF) << 32) +
238     * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) +     * ((byte5 & 0xFF) << 24) + ((byte6 & 0xFF) << 16) +
239     * ((byte7 & 0xFF) << 8) + (byte9 & 0xFF)))     * ((byte7 & 0xFF) << 8) + (byte8 & 0xFF)))
240     * </code>     * </code>
241     * <p>     * <p>
242     * The value returned is in the range of -9223372036854775808 to     * The value returned is in the range of -9223372036854775808 to
# Line 316  public interface DataInput Line 318  public interface DataInput
318     * charaters are discarded and are not returned as part of the string.     * charaters are discarded and are not returned as part of the string.
319     * A line is also terminated by an end of file condition.     * A line is also terminated by an end of file condition.
320     * <p>     * <p>
    * This method can read data that was written by an object implementing the  
    * <code>writeLine()</code> method in <code>DataOutput</code>.  
321     *     *
322     * @return The line read as a <code>String</code>     * @return The line read as a <code>String</code>
323     *     *
324     * @exception IOException If an error occurs     * @exception IOException If an error occurs
    *  
    * @see DataOutput#writeLine  
325     */     */
326    String readLine() throws IOException;    String readLine() throws IOException;
327    
# Line 442  public interface DataInput Line 440  public interface DataInput
440     * This method skips and discards the specified number of bytes in an     * This method skips and discards the specified number of bytes in an
441     * input stream.  Note that this method may skip less than the requested     * input stream.  Note that this method may skip less than the requested
442     * number of bytes.  The actual number of bytes skipped is returned.     * number of bytes.  The actual number of bytes skipped is returned.
443       * No bytes are skipped if a negative number is passed to this method.
444     *     *
445     * @param numBytes The number of bytes to skip     * @param numBytes The number of bytes to skip
446     *     *

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26