public class ImageInputStreamWrapper extends InputStream
ImageInputStream into
a InputStream
. The reason is that ImageInputStream
implements DataInput
but doesn't extend
InputStream
. However, the JJ2000 JPEG 2000 packages accepts
a InputStream
when reads a JPEG 2000 image file.
-
-
Constructor Summary
Constructors
Constructor and Description
ImageInputStreamWrapper(ImageInputStream src)
Constructs an ImageInputStreamWrapper
from the provided
ImageInputStream
.
-
Method Summary
Methods
Modifier and Type
Method and Description
void
close()
void
mark(int readlimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] b,
int off,
int len)
void
reset()
long
skip(long n)
-
Methods inherited from class java.io.InputStream
available
-
-
Constructor Detail
-
ImageInputStreamWrapper
public ImageInputStreamWrapper(ImageInputStream src)
Constructs an ImageInputStreamWrapper
from the provided
ImageInputStream
.
- Parameters:
src
- The ImageInputStream
to be wrapped.
-
Method Detail
-
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
-
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface AutoCloseable
- Overrides:
close
in class InputStream
- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
mark
in class InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in class InputStream
-
read
public int read(byte[] b)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
-
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
-
reset
public void reset()
throws IOException
- Overrides:
reset
in class InputStream
- Throws:
IOException
-
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class InputStream
- Throws:
IOException
Copyright © 2014 Open Microscopy Environment