public class ByteBufferStream extends Object
A new version of the ByteChunkStream. It will search for starting signatures of byte chunks and emit those chunks.
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
JPEG_EOI |
static byte[] |
JPEG_SOI |
| Constructor and Description |
|---|
ByteBufferStream(InputStream in,
int readBufferSize,
int maxResultBuffer,
byte[] startSig,
boolean continuous) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBytesRead() |
protected static int |
indexOf(byte[] buffer,
byte[] sig,
int from) |
protected static boolean |
isSignatureAt(byte[] buffer,
int pos,
byte[] sig) |
byte[] |
readNextChunk() |
public static final byte[] JPEG_SOI
public static final byte[] JPEG_EOI
public ByteBufferStream(InputStream in, int readBufferSize, int maxResultBuffer, byte[] startSig, boolean continuous)
public long getBytesRead()
public byte[] readNextChunk()
throws IOException
IOExceptionpublic void close()
protected static boolean isSignatureAt(byte[] buffer,
int pos,
byte[] sig)
pos - sig - protected static int indexOf(byte[] buffer,
byte[] sig,
int from)
sig - from - Copyright © 2015. All rights reserved.