Package gov.nih.mipav.model.file.rawjp2
Class BEByteArrayInputStream
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
gov.nih.mipav.model.file.rawjp2.BEByteArrayInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,jj2000.j2k.io.BinaryDataInput,jj2000.j2k.io.BinaryDataOutput,jj2000.j2k.io.RandomAccessIO
public class BEByteArrayInputStream
extends ByteArrayInputStream
implements jj2000.j2k.io.RandomAccessIO
Big Endian Input Array Stream, works as a replacement for BERandomAccessFile
at the input of Jpeg2K decoder.
- Author:
- Dzung Nguyen
- See Also:
-
Field Summary
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos -
Constructor Summary
ConstructorsConstructorDescriptionBEByteArrayInputStream(byte[] buf) BEByteArrayInputStream(byte[] buf, int offset, int length) -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()intintgetPos()intlength()bytereadByte()doublefloatvoidreadFully(byte[] b, int off, int len) intreadInt()longreadLong()shortintlongintvoidseek(int off) intskipBytes(int n) voidwrite(int b) voidwriteByte(int v) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInt(int v) voidwriteLong(long v) voidwriteShort(int v) Methods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferToMethods inherited from class java.io.InputStream
nullInputStream, read, readNBytes, skipNBytesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jj2000.j2k.io.RandomAccessIO
close, read
-
Constructor Details
-
BEByteArrayInputStream
public BEByteArrayInputStream(byte[] buf, int offset, int length) -
BEByteArrayInputStream
public BEByteArrayInputStream(byte[] buf)
-
-
Method Details
-
getPos
- Specified by:
getPosin interfacejj2000.j2k.io.RandomAccessIO- Throws:
IOException
-
length
- Specified by:
lengthin interfacejj2000.j2k.io.RandomAccessIO- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfacejj2000.j2k.io.RandomAccessIO- Throws:
IOException
-
seek
- Specified by:
seekin interfacejj2000.j2k.io.RandomAccessIO- Throws:
IOException
-
write
- Specified by:
writein interfacejj2000.j2k.io.RandomAccessIO- Throws:
IOException
-
getByteOrdering
public int getByteOrdering()- Specified by:
getByteOrderingin interfacejj2000.j2k.io.BinaryDataInput- Specified by:
getByteOrderingin interfacejj2000.j2k.io.BinaryDataOutput
-
readByte
- Specified by:
readBytein interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readDouble
- Specified by:
readDoublein interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readFloat
- Specified by:
readFloatin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readInt
- Specified by:
readIntin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readLong
- Specified by:
readLongin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readShort
- Specified by:
readShortin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readUnsignedInt
- Specified by:
readUnsignedIntin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
skipBytes
- Specified by:
skipBytesin interfacejj2000.j2k.io.BinaryDataInput- Throws:
EOFExceptionIOException
-
flush
- Specified by:
flushin interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfacejj2000.j2k.io.BinaryDataOutput- Throws:
IOException
-