Package net.bramp.ffmpeg.io
Class CRC32InputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- net.bramp.ffmpeg.io.CRC32InputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CRC32InputStream extends FilterInputStream
Calculates the CRC32 for all bytes read through the input stream. Using the java.util.zip.CRC32 class to calculate the checksum.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CRC32InputStream(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetValue()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()voidresetCrc()longskip(long n)-
Methods inherited from class java.io.FilterInputStream
available, close
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
CRC32InputStream
public CRC32InputStream(InputStream in)
-
-
Method Detail
-
resetCrc
public void resetCrc()
-
getValue
public long getValue()
-
read
public int read() throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skipin classFilterInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classFilterInputStream
-
reset
public void reset() throws IOException
- Overrides:
resetin classFilterInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classFilterInputStream
-
-