There are 3 code examples for javax.imageio.stream.ImageInputStream.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: jnode-core Package: org.jnode.imageio.jpeg
Source Code: JPEGDecoderAdapter.java (Click to view .java file)
Method Code:
public JPEGDecoderAdapter(final ImageInputStream in) throws JPEGException {
dec=new JPEGDecoder();
is=new BufferedInputStream(new InputStream(){
public int read() throws IOException {
return in.read();
}
}
);
}
Project Name: jnode-core Package: org.jnode.imageio.jpeg
Source Code: JPEGDecoderAdapter.java (Click to view .java file)
Method Code:
public int read() throws IOException {
return in.read();
}
Project Name: jnode-core Package: org.jnode.imageio.jpeg
Source Code: JPEGImageReaderSpi.java (Click to view .java file)
Method Code:
public boolean canDecodeInput(Object input) throws IOException {
if (!(input instanceof ImageInputStream)) return false;
ImageInputStream in=(ImageInputStream)input;
boolean retval;
in.mark();
try {
new JPEGDecoderAdapter(in).decode();
retval=true;
}
catch ( JPEGException e) {
retval=false;
}
in.reset();
return retval;
}