public class ChunkReaderFilter extends FilterInputStream
ChunkReaderFilter reader = new ChunkReaderFilter(new FileInputStream("image.png"));
BufferedImage image1 = ImageIO.read(reader);
reader.readUntilEndAndClose(); // in case ImageIO.read() does not read the traling chunks (it happens)
System.out.println(reader.getChunksList());
in| Constructor and Description |
|---|
ChunkReaderFilter(InputStream arg0) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected ChunkSeqReaderPng |
createChunkSequenceReader() |
ChunkSeqReaderPng |
getChunkseq() |
List<PngChunk> |
getChunksList() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
readUntilEndAndClose() |
available, mark, markSupported, reset, skippublic ChunkReaderFilter(InputStream arg0)
protected ChunkSeqReaderPng createChunkSequenceReader()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic void readUntilEndAndClose()
throws IOException
IOExceptionpublic ChunkSeqReaderPng getChunkseq()
Copyright © 2013. All rights reserved.