public class IISRandomAccessIO extends Object implements RandomAccessIO
ImageInputStream into a
 RandomAccessIO. The resulting class is read-only.| Constructor and Description | 
|---|
IISRandomAccessIO(ImageInputStream iis)
Creates a  
RandomAccessIO instance from the supplied
 ImageInputStream. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Closes the I/O stream. 
 | 
void | 
flush()
A null operation as writing is not supported. 
 | 
int | 
getByteOrdering()
Returns the endianess (i.e., byte ordering) of the implementing
 class. 
 | 
int | 
getPos()
Returns the stream position clamped to a maximum of
  
Integer.MAX_VALUE. | 
int | 
length()
Returns the length of the data stream. 
 | 
int | 
read()
Reads a byte of data from the stream. 
 | 
byte | 
readByte()
Should read a signed byte (i.e., 8 bit) from the input. 
 | 
double | 
readDouble()
Should read an IEEE double precision (i.e., 64 bit)
 floating-point number from the input. 
 | 
float | 
readFloat()
Should read an IEEE single precision (i.e., 32 bit)
 floating-point number from the input. 
 | 
void | 
readFully(byte[] b,
         int off,
         int n)
Reads up to len bytes of data from this file into an array of
 bytes. 
 | 
int | 
readInt()
Should read a signed int (i.e., 32 bit) from the input. 
 | 
long | 
readLong()
Should read a signed long (i.e., 64 bit) from the input. 
 | 
short | 
readShort()
Should read a signed short (i.e., 16 bit) from the input. 
 | 
int | 
readUnsignedByte()
Should read an unsigned byte (i.e., 8 bit) from the input. 
 | 
long | 
readUnsignedInt()
Should read an unsigned int (i.e., 32 bit) from the input. 
 | 
int | 
readUnsignedShort()
Should read an unsigned short (i.e., 16 bit) from the input. 
 | 
void | 
seek(int off)
Moves the current position for the next read or write operation to
 offset. 
 | 
int | 
skipBytes(int n)
Skips n bytes from the input. 
 | 
void | 
write(int b)
Throws an  
IOException as writing is not supported. | 
void | 
writeByte(int v)
Throws an  
IOException as writing is not supported. | 
void | 
writeDouble(double v)
Throws an  
IOException as writing is not supported. | 
void | 
writeFloat(float v)
Throws an  
IOException as writing is not supported. | 
void | 
writeInt(int v)
Throws an  
IOException as writing is not supported. | 
void | 
writeLong(long v)
Throws an  
IOException as writing is not supported. | 
void | 
writeShort(int v)
Throws an  
IOException as writing is not supported. | 
public IISRandomAccessIO(ImageInputStream iis)
RandomAccessIO instance from the supplied
 ImageInputStream.iis - The source ImageInputStream.public void close()
           throws IOException
RandomAccessIOclose in interface RandomAccessIOIOException - If an I/O error ocurred.public int getPos()
           throws IOException
Integer.MAX_VALUE.getPos in interface RandomAccessIOIOException - If an I/O error ocurred.public void seek(int off)
          throws IOException
RandomAccessIOseek in interface RandomAccessIOoff - The offset where to move to.EOFException - If in read-only and seeking beyond EOF.IOException - If an I/O error ocurred.public int length()
           throws IOException
If the length of the ImageInputStream is not
 -1, then it is returned after being clamped to
 a maximum value of Integer.MAX_VALUE. If the
 ImageInputStream is -1, the stream
 is read to a maximum position of Integer.MAX_VALUE
 and its final position is returned. The position of the stream
 is unchanged from the value it had prior to the call.
length in interface RandomAccessIOIOException - If an I/O error ocurred.public int read()
         throws IOException
RandomAccessIOread in interface RandomAccessIOEOFException - If the end-of file was reached.IOException - If an I/O error ocurred.public void readFully(byte[] b,
             int off,
             int n)
               throws IOException
RandomAccessIOreadFully in interface RandomAccessIOb - The buffer into which the data is to be read. It must be long
 enough.off - The index in 'b' where to place the first byte read.n - The number of bytes to read.EOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public int getByteOrdering()
BinaryDataInputgetByteOrdering in interface BinaryDataInputgetByteOrdering in interface BinaryDataOutputEndianTypepublic byte readByte()
              throws IOException
BinaryDataInputreadByte in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public int readUnsignedByte()
                     throws IOException
BinaryDataInputreadUnsignedByte in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public short readShort()
                throws IOException
BinaryDataInputreadShort in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public int readUnsignedShort()
                      throws IOException
BinaryDataInputreadUnsignedShort in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public int readInt()
            throws IOException
BinaryDataInputreadInt in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public long readUnsignedInt()
                     throws IOException
BinaryDataInputreadUnsignedInt in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public long readLong()
              throws IOException
BinaryDataInputreadLong in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public float readFloat()
                throws IOException
BinaryDataInputreadFloat in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public double readDouble()
                  throws IOException
BinaryDataInputreadDouble in interface BinaryDataInputEOFException - If the end-of file was reached before
 getting all the necessary data.IOException - If an I/O error ocurred.public int skipBytes(int n)
              throws IOException
BinaryDataInputskipBytes in interface BinaryDataInputn - The number of bytes to skipEOFException - If the end-of file was reached before
 all the bytes could be skipped.IOException - If an I/O error ocurred.public void flush()
flush in interface BinaryDataOutputpublic void write(int b)
           throws IOException
IOException as writing is not supported.write in interface RandomAccessIOb - The byte to write. The lower 8 bits of b are
 written.IOException - If an I/O error ocurred.public void writeByte(int v)
               throws IOException
IOException as writing is not supported.writeByte in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.public void writeShort(int v)
                throws IOException
IOException as writing is not supported.writeShort in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.public void writeInt(int v)
              throws IOException
IOException as writing is not supported.writeInt in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.public void writeLong(long v)
               throws IOException
IOException as writing is not supported.writeLong in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.public void writeFloat(float v)
                throws IOException
IOException as writing is not supported.writeFloat in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.public void writeDouble(double v)
                 throws IOException
IOException as writing is not supported.writeDouble in interface BinaryDataOutputv - The value to write to the outputIOException - If an I/O error ocurred.Copyright © 2014 Open Microscopy Environment