public class CroppedImageInputByteStream extends Object implements InputByteStream
InputByteStream.
So, clients are recommended to read the javadocs of individual API's of this class before using them.EOF| Constructor and Description |
|---|
CroppedImageInputByteStream(int bpc,
int noc,
InputStream decodedImage,
int width,
int height,
int x1,
int y1,
int x2,
int y2)
Constructor to create an instance of this InputByteStream which reads subimage of dimension (x2-x1)*(y2-y1), of
specified bits per component and number of components, from passed
InputStream |
| Modifier and Type | Method and Description |
|---|---|
long |
bytesAvailable()
Only for internal engineering use.
|
void |
close()
Closes this InputByteStream and releases any system resources associated with the stream.
|
boolean |
eof()
Only for internal engineering use.
|
long |
getPosition()
Only for internal engineering use.
|
long |
length()
Only for internal engineering use.
|
int |
read()
Only for internal engineering use.
|
int |
read(byte[] bytes)
Only for internal engineering use.
|
int |
read(byte[] bytes,
int position,
int length)
Only for internal engineering use.
|
InputByteStream |
seek(long position)
Not supported
|
InputByteStream |
slice()
Returns itself.
|
InputByteStream |
slice(long begin,
long length)
Not supported
|
InputStream |
toInputStream()
Returns an instance of
InputStream which uses this stream only
as back-end. |
int |
unget()
Not supported
|
public CroppedImageInputByteStream(int bpc,
int noc,
InputStream decodedImage,
int width,
int height,
int x1,
int y1,
int x2,
int y2)
throws IOException
InputStreambpc - bits per component of imagenoc - number of componentsdecodedImage - image input streamwidth - image widthheight - image heightx1 - lefty1 - bottomx2 - righty2 - topIOExceptionpublic InputByteStream slice(long begin, long length) throws IOException
slice in interface InputByteStreambegin - Offset within the current InputByteStream to start the slice.length - The length of the slice.InputByteStream.IOExceptionpublic InputByteStream slice() throws IOException
slice in interface InputByteStreamInputByteStream.IOExceptionpublic int read()
throws IOException
InputByteStream-1. If not beyond the end
of the underlying data the current position is incremented by 1.read in interface InputByteStream-1 if at or beyond EOF.IOExceptionpublic int read(byte[] bytes,
int position,
int length)
throws IOException
InputByteStreamread in interface InputByteStreambytes - The destination array.position - The offset in the byte array to put the first byte read.length - The number of bytes to read.IOExceptionpublic int read(byte[] bytes)
throws IOException
InputByteStreamread in interface InputByteStreambytes - The destination array.IOExceptionpublic int unget()
throws IOException
unget in interface InputByteStreamIOExceptionpublic InputByteStream seek(long position) throws IOException
seek in interface InputByteStreamposition - Where to set the current position.IOExceptionpublic long getPosition()
throws IOException
InputByteStreamgetPosition in interface InputByteStreamIOExceptionpublic long length()
throws IOException
InputByteStreamInputByteStream.length in interface InputByteStreamInputByteStream.IOExceptionpublic long bytesAvailable()
throws IOException
InputByteStreambytesAvailable in interface InputByteStreamInputByteStream.IOExceptionpublic boolean eof()
throws IOException
InputByteStreamInputByteStream at or beyond the
end of the underlying data.eof in interface InputByteStreamIOExceptionpublic void close()
throws IOException
InputByteStreamclose in interface InputByteStreamIOExceptionpublic InputStream toInputStream() throws IOException
InputStream which uses this stream only
as back-end. So, closing one of them will close the other also.toInputStream in interface InputByteStreamIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved