public class ArrayInputStream extends java.io.FilterInputStream implements ArrayInput
ArrayInput
.Constructor and Description |
---|
ArrayInputStream(java.io.File file)
Constructs an array input stream for the specified file.
|
ArrayInputStream(java.io.File file,
java.nio.ByteOrder bo)
Constructs an array input stream for the specified file and byte order.
|
ArrayInputStream(java.io.FileInputStream fis)
Constructs an array input stream for the specified file input stream.
|
ArrayInputStream(java.io.InputStream is)
Constructs an array input stream for the specified stream.
|
ArrayInputStream(java.io.InputStream is,
java.nio.ByteOrder bo)
Constructs an array input stream for the specified stream and byte order.
|
ArrayInputStream(java.lang.String name)
Constructs an array input stream for the specified file name.
|
ArrayInputStream(java.lang.String name,
java.nio.ByteOrder bo)
Constructs an array input stream for the specified file name
and byte order.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this array input stream.
|
java.nio.ByteOrder |
getByteOrder()
Gets the byte order for this stream.
|
boolean |
readBoolean() |
byte |
readByte() |
void |
readBytes(byte[] v)
Reads byte elements into a specified array.
|
void |
readBytes(byte[][] v)
Reads byte elements into a specified array.
|
void |
readBytes(byte[][][] v)
Reads byte elements into a specified array.
|
void |
readBytes(byte[] v,
int k,
int n)
Reads byte elements into a specified array.
|
char |
readChar() |
void |
readChars(char[] v)
Reads char elements into a specified array.
|
void |
readChars(char[][] v)
Reads char elements into a specified array.
|
void |
readChars(char[][][] v)
Reads char elements into a specified array.
|
void |
readChars(char[] v,
int k,
int n)
Reads char elements into a specified array.
|
double |
readDouble() |
void |
readDoubles(double[] v)
Reads double elements into a specified array.
|
void |
readDoubles(double[][] v)
Reads double elements into a specified array.
|
void |
readDoubles(double[][][] v)
Reads double elements into a specified array.
|
void |
readDoubles(double[] v,
int k,
int n)
Reads double elements into a specified array.
|
float |
readFloat() |
void |
readFloats(float[] v)
Reads float elements into a specified array.
|
void |
readFloats(float[][] v)
Reads float elements into a specified array.
|
void |
readFloats(float[][][] v)
Reads float elements into a specified array.
|
void |
readFloats(float[] v,
int k,
int n)
Reads float elements into a specified array.
|
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
void |
readInts(int[] v)
Reads int elements into a specified array.
|
void |
readInts(int[][] v)
Reads int elements into a specified array.
|
void |
readInts(int[][][] v)
Reads int elements into a specified array.
|
void |
readInts(int[] v,
int k,
int n)
Reads int elements into a specified array.
|
java.lang.String |
readLine() |
long |
readLong() |
void |
readLongs(long[] v)
Reads long elements into a specified array.
|
void |
readLongs(long[][] v)
Reads long elements into a specified array.
|
void |
readLongs(long[][][] v)
Reads long elements into a specified array.
|
void |
readLongs(long[] v,
int k,
int n)
Reads long elements into a specified array.
|
short |
readShort() |
void |
readShorts(short[] v)
Reads short elements into a specified array.
|
void |
readShorts(short[][] v)
Reads short elements into a specified array.
|
void |
readShorts(short[][][] v)
Reads short elements into a specified array.
|
void |
readShorts(short[] v,
int k,
int n)
Reads short elements into a specified array.
|
int |
readUnsignedByte() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
int |
skipBytes(int n) |
public ArrayInputStream(java.io.InputStream is)
is
- the input stream.public ArrayInputStream(java.io.FileInputStream fis)
fis
- the file input stream.public ArrayInputStream(java.lang.String name) throws java.io.FileNotFoundException
name
- the file name.java.io.FileNotFoundException
public ArrayInputStream(java.io.File file) throws java.io.FileNotFoundException
file
- the file.java.io.FileNotFoundException
public ArrayInputStream(java.io.InputStream is, java.nio.ByteOrder bo)
is
- the input stream.bo
- the byte order.public ArrayInputStream(java.lang.String name, java.nio.ByteOrder bo) throws java.io.FileNotFoundException
name
- the file name.bo
- the byte order.java.io.FileNotFoundException
public ArrayInputStream(java.io.File file, java.nio.ByteOrder bo) throws java.io.FileNotFoundException
file
- the file.bo
- the byte order.java.io.FileNotFoundException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterInputStream
java.io.IOException
public java.nio.ByteOrder getByteOrder()
public void readFully(byte[] b) throws java.io.IOException
readFully
in interface ArrayInput
readFully
in interface java.io.DataInput
java.io.IOException
public void readFully(byte[] b, int off, int len) throws java.io.IOException
readFully
in interface ArrayInput
readFully
in interface java.io.DataInput
java.io.IOException
public int skipBytes(int n) throws java.io.IOException
skipBytes
in interface ArrayInput
skipBytes
in interface java.io.DataInput
java.io.IOException
public final boolean readBoolean() throws java.io.IOException
readBoolean
in interface ArrayInput
readBoolean
in interface java.io.DataInput
java.io.IOException
public final byte readByte() throws java.io.IOException
readByte
in interface ArrayInput
readByte
in interface java.io.DataInput
java.io.IOException
public final int readUnsignedByte() throws java.io.IOException
readUnsignedByte
in interface ArrayInput
readUnsignedByte
in interface java.io.DataInput
java.io.IOException
public final short readShort() throws java.io.IOException
readShort
in interface ArrayInput
readShort
in interface java.io.DataInput
java.io.IOException
public final int readUnsignedShort() throws java.io.IOException
readUnsignedShort
in interface ArrayInput
readUnsignedShort
in interface java.io.DataInput
java.io.IOException
public final char readChar() throws java.io.IOException
readChar
in interface ArrayInput
readChar
in interface java.io.DataInput
java.io.IOException
public final int readInt() throws java.io.IOException
readInt
in interface ArrayInput
readInt
in interface java.io.DataInput
java.io.IOException
public final long readLong() throws java.io.IOException
readLong
in interface ArrayInput
readLong
in interface java.io.DataInput
java.io.IOException
public final float readFloat() throws java.io.IOException
readFloat
in interface ArrayInput
readFloat
in interface java.io.DataInput
java.io.IOException
public final double readDouble() throws java.io.IOException
readDouble
in interface ArrayInput
readDouble
in interface java.io.DataInput
java.io.IOException
public final java.lang.String readLine() throws java.io.IOException
readLine
in interface ArrayInput
readLine
in interface java.io.DataInput
java.io.IOException
public final java.lang.String readUTF() throws java.io.IOException
readUTF
in interface ArrayInput
readUTF
in interface java.io.DataInput
java.io.IOException
public void readBytes(byte[] v, int k, int n) throws java.io.IOException
readBytes
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readBytes(byte[] v) throws java.io.IOException
readBytes
in interface ArrayInput
v
- the array.java.io.IOException
public void readBytes(byte[][] v) throws java.io.IOException
readBytes
in interface ArrayInput
v
- the array.java.io.IOException
public void readBytes(byte[][][] v) throws java.io.IOException
readBytes
in interface ArrayInput
v
- the array.java.io.IOException
public void readChars(char[] v, int k, int n) throws java.io.IOException
readChars
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readChars(char[] v) throws java.io.IOException
readChars
in interface ArrayInput
v
- the array.java.io.IOException
public void readChars(char[][] v) throws java.io.IOException
readChars
in interface ArrayInput
v
- the array.java.io.IOException
public void readChars(char[][][] v) throws java.io.IOException
readChars
in interface ArrayInput
v
- the array.java.io.IOException
public void readShorts(short[] v, int k, int n) throws java.io.IOException
readShorts
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readShorts(short[] v) throws java.io.IOException
readShorts
in interface ArrayInput
v
- the array.java.io.IOException
public void readShorts(short[][] v) throws java.io.IOException
readShorts
in interface ArrayInput
v
- the array.java.io.IOException
public void readShorts(short[][][] v) throws java.io.IOException
readShorts
in interface ArrayInput
v
- the array.java.io.IOException
public void readInts(int[] v, int k, int n) throws java.io.IOException
readInts
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readInts(int[] v) throws java.io.IOException
readInts
in interface ArrayInput
v
- the array.java.io.IOException
public void readInts(int[][] v) throws java.io.IOException
readInts
in interface ArrayInput
v
- the array.java.io.IOException
public void readInts(int[][][] v) throws java.io.IOException
readInts
in interface ArrayInput
v
- the array.java.io.IOException
public void readLongs(long[] v, int k, int n) throws java.io.IOException
readLongs
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readLongs(long[] v) throws java.io.IOException
readLongs
in interface ArrayInput
v
- the array.java.io.IOException
public void readLongs(long[][] v) throws java.io.IOException
readLongs
in interface ArrayInput
v
- the array.java.io.IOException
public void readLongs(long[][][] v) throws java.io.IOException
readLongs
in interface ArrayInput
v
- the array.java.io.IOException
public void readFloats(float[] v, int k, int n) throws java.io.IOException
readFloats
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readFloats(float[] v) throws java.io.IOException
readFloats
in interface ArrayInput
v
- the array.java.io.IOException
public void readFloats(float[][] v) throws java.io.IOException
readFloats
in interface ArrayInput
v
- the array.java.io.IOException
public void readFloats(float[][][] v) throws java.io.IOException
readFloats
in interface ArrayInput
v
- the array.java.io.IOException
public void readDoubles(double[] v, int k, int n) throws java.io.IOException
readDoubles
in interface ArrayInput
v
- the array.k
- the index of the first element to read.n
- the number of elements to read.java.io.IOException
public void readDoubles(double[] v) throws java.io.IOException
readDoubles
in interface ArrayInput
v
- the array.java.io.IOException
public void readDoubles(double[][] v) throws java.io.IOException
readDoubles
in interface ArrayInput
v
- the array.java.io.IOException
public void readDoubles(double[][][] v) throws java.io.IOException
readDoubles
in interface ArrayInput
v
- the array.java.io.IOException