Package net.bramp.ffmpeg.nut
Class NutDataInputStream
java.lang.Object
net.bramp.ffmpeg.nut.NutDataInputStream
- All Implemented Interfaces:
DataInput
A DataInputStream that implements a couple of custom FFmpeg Nut datatypes.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new NutDataInputStream wrapping the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionlonggetCRC()Returns the current CRC32 checksum value.longoffset()Returns the current byte offset in the input stream.booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()Deprecated.longreadLong()shortlongReads a signed variable-length encoded integer.longReturns the start code, or the frame code if it does not start with 'N'.intintreadUTF()byte[]Reads a byte array prefixed with a variable-length encoded length.intReads a variable-length encoded integer up to 32 bits.longReads a variable-length encoded integer up to 64 bits.voidresetCRC()Resets the CRC32 checksum for a new calculation range.intskipBytes(int n)
-
Constructor Details
-
NutDataInputStream
Constructs a new NutDataInputStream wrapping the given input stream.
-
-
Method Details
-
resetCRC
Resets the CRC32 checksum for a new calculation range. -
getCRC
Returns the current CRC32 checksum value. -
readVarInt
Reads a variable-length encoded integer up to 32 bits.- Throws:
IOException
-
readVarLong
Reads a variable-length encoded integer up to 64 bits.- Throws:
IOException
-
readSignedVarInt
Reads a signed variable-length encoded integer.- Throws:
IOException
-
readVarArray
Reads a byte array prefixed with a variable-length encoded length.- Throws:
IOException
-
readStartCode
Returns the start code, or the frame code if it does not start with 'N'.- Throws:
IOException
-
offset
Returns the current byte offset in the input stream. -
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readLine
Deprecated.- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-