edu.mines.jtk.io
Interface ArrayInput

All Superinterfaces:
java.io.DataInput
All Known Implementing Classes:
ArrayFile, ArrayInputAdapter, ArrayInputStream

public interface ArrayInput
extends java.io.DataInput

An interface for reading arrays of primitive values from a binary stream. This interfaces extends the standard interface DataInput. It adds methods for reading arrays of primitive values.

Version:
2006.08.05
Author:
Dave Hale, Colorado School of Mines

Method Summary
 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)
           
 

Method Detail

readFully

void readFully(byte[] b)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

readFully

void readFully(byte[] b,
               int off,
               int len)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

skipBytes

int skipBytes(int n)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Throws:
java.io.IOException

readBoolean

boolean readBoolean()
                    throws java.io.IOException
Specified by:
readBoolean in interface java.io.DataInput
Throws:
java.io.IOException

readByte

byte readByte()
              throws java.io.IOException
Specified by:
readByte in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedByte

int readUnsignedByte()
                     throws java.io.IOException
Specified by:
readUnsignedByte in interface java.io.DataInput
Throws:
java.io.IOException

readShort

short readShort()
                throws java.io.IOException
Specified by:
readShort in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedShort

int readUnsignedShort()
                      throws java.io.IOException
Specified by:
readUnsignedShort in interface java.io.DataInput
Throws:
java.io.IOException

readChar

char readChar()
              throws java.io.IOException
Specified by:
readChar in interface java.io.DataInput
Throws:
java.io.IOException

readInt

int readInt()
            throws java.io.IOException
Specified by:
readInt in interface java.io.DataInput
Throws:
java.io.IOException

readLong

long readLong()
              throws java.io.IOException
Specified by:
readLong in interface java.io.DataInput
Throws:
java.io.IOException

readFloat

float readFloat()
                throws java.io.IOException
Specified by:
readFloat in interface java.io.DataInput
Throws:
java.io.IOException

readDouble

double readDouble()
                  throws java.io.IOException
Specified by:
readDouble in interface java.io.DataInput
Throws:
java.io.IOException

readLine

java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface java.io.DataInput
Throws:
java.io.IOException

readUTF

java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Throws:
java.io.IOException

readBytes

void readBytes(byte[] v,
               int k,
               int n)
               throws java.io.IOException
Reads byte elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readBytes

void readBytes(byte[] v)
               throws java.io.IOException
Reads byte elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readBytes

void readBytes(byte[][] v)
               throws java.io.IOException
Reads byte elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readBytes

void readBytes(byte[][][] v)
               throws java.io.IOException
Reads byte elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readChars

void readChars(char[] v,
               int k,
               int n)
               throws java.io.IOException
Reads char elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readChars

void readChars(char[] v)
               throws java.io.IOException
Reads char elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readChars

void readChars(char[][] v)
               throws java.io.IOException
Reads char elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readChars

void readChars(char[][][] v)
               throws java.io.IOException
Reads char elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readShorts

void readShorts(short[] v,
                int k,
                int n)
                throws java.io.IOException
Reads short elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readShorts

void readShorts(short[] v)
                throws java.io.IOException
Reads short elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readShorts

void readShorts(short[][] v)
                throws java.io.IOException
Reads short elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readShorts

void readShorts(short[][][] v)
                throws java.io.IOException
Reads short elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readInts

void readInts(int[] v,
              int k,
              int n)
              throws java.io.IOException
Reads int elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readInts

void readInts(int[] v)
              throws java.io.IOException
Reads int elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readInts

void readInts(int[][] v)
              throws java.io.IOException
Reads int elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readInts

void readInts(int[][][] v)
              throws java.io.IOException
Reads int elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readLongs

void readLongs(long[] v,
               int k,
               int n)
               throws java.io.IOException
Reads long elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readLongs

void readLongs(long[] v)
               throws java.io.IOException
Reads long elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readLongs

void readLongs(long[][] v)
               throws java.io.IOException
Reads long elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readLongs

void readLongs(long[][][] v)
               throws java.io.IOException
Reads long elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readFloats

void readFloats(float[] v,
                int k,
                int n)
                throws java.io.IOException
Reads float elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readFloats

void readFloats(float[] v)
                throws java.io.IOException
Reads float elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readFloats

void readFloats(float[][] v)
                throws java.io.IOException
Reads float elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readFloats

void readFloats(float[][][] v)
                throws java.io.IOException
Reads float elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readDoubles

void readDoubles(double[] v,
                 int k,
                 int n)
                 throws java.io.IOException
Reads double elements into a specified array.

Parameters:
v - the array.
k - the index of the first element to read.
n - the number of elements to read.
Throws:
java.io.IOException

readDoubles

void readDoubles(double[] v)
                 throws java.io.IOException
Reads double elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readDoubles

void readDoubles(double[][] v)
                 throws java.io.IOException
Reads double elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException

readDoubles

void readDoubles(double[][][] v)
                 throws java.io.IOException
Reads double elements into a specified array. The array length equals the number of elements to read.

Parameters:
v - the array.
Throws:
java.io.IOException