|
|
||||||||||||||||||||||||||||||||||||||||||
Class DataBoundInputStreampublic class DataBoundInputStream extends FilterInputStream implements DataInput { // Constructors public DataBoundInputStream(InputStream in); public DataBoundInputStream(InputStream in, boolean isBig); // Methods public void align(); public final boolean getEndian(); public int read(byte b[]) throws IOException; public int read(byte b[], int off, int len) throws IOException; public boolean readBoolean() throws IOException; public byte readByte() throws IOException; public char readChar() throws IOException; public double readDouble() throws IOException; public float readFloat() throws IOException; public void readFully(byte b[]) throws IOException; public void readFully(byte b[], int off, int len) throws IOException; public int readInt() throws IOException; public String readLine() throws IOException; public long readLong() throws IOException; public short readShort() throws IOException; public int readUnsignedByte() throws IOException; public int readUnsignedShort() throws IOException; public String readUTF() throws IOException; public final static String readUTF(DataInput in) throws IOException; public final void setEndian(boolean isBig); public int skipBytes(int n) throws IOException; } This class enables primitive Java data types to be read from a stream in a portable way. Primitive data types are well understood types with associated operations. For example, integers are considered primitive data types. This class is functionally exactly the same as java.io.DataInputStream except that
(a) it balances short reads, so that it can DWORD align. (b) you can specify whether the file is big endian or little endian. Also see java.io.DataOutputStream, java.io.DataBoundOutputStream FilterInputStream | +--DataBoundInputStream ConstructorsDataBoundInputStreampublic DataBoundInputStream(InputStream in); DataBoundInputStreampublic DataBoundInputStream(InputStream in, boolean isBig); Methodsalignpublic void align(); getEndianpublic final boolean getEndian(); readpublic int read(byte b[]) throws IOException; readpublic int read(byte b[], int off, int len) throws IOException; readBooleanpublic boolean readBoolean() throws IOException; readBytepublic byte readByte() throws IOException; readCharpublic char readChar() throws IOException; readDoublepublic double readDouble() throws IOException; readFloatpublic float readFloat() throws IOException; readFullypublic void readFully(byte b[]) throws IOException; readFullypublic void readFully(byte b[], int off, int len) throws IOException; readIntpublic int readInt() throws IOException; readLinepublic String readLine() throws IOException; readLongpublic long readLong() throws IOException; readShortpublic short readShort() throws IOException; readUnsignedBytepublic int readUnsignedByte() throws IOException; readUnsignedShortpublic int readUnsignedShort() throws IOException; readUTFpublic String readUTF() throws IOException; readUTFpublic final static String readUTF(DataInput in) throws IOException; setEndianpublic final void setEndian(boolean isBig); skipBytespublic int skipBytes(int n) throws IOException;
|
© 1998 Microsoft Corporation. All rights reserved. Terms of use. |