@Service(value=ImageReader.class) @Property(name="service.ranking", intValue=0, propertyPrivate=false) public class ImageIOImageReader extends Object implements ImageReader
Constructor and Description |
---|
ImageIOImageReader() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
getBufferedImage(File file)
Creates a
BufferedImage from an File . |
BufferedImage |
getBufferedImage(InputStream in)
Creates a
BufferedImage from an InputStream . |
BufferedImage |
getBufferedImage(URL url)
Creates a
BufferedImage from a URL . |
public BufferedImage getBufferedImage(File file) throws IOException
ImageReader
BufferedImage
from an File
.getBufferedImage
in interface ImageReader
file
- the image file.BufferedImage
containing the data of the specified
image.IOException
public BufferedImage getBufferedImage(InputStream in) throws IOException
ImageReader
BufferedImage
from an InputStream
.getBufferedImage
in interface ImageReader
in
- a stream from which the image data can be read.BufferedImage
containing the data of the specified
image.IOException
public BufferedImage getBufferedImage(URL url) throws IOException
ImageReader
BufferedImage
from a URL
.getBufferedImage
in interface ImageReader
url
- the location of the image described as a URL.BufferedImage
containing the data of the specified
image.IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.