public class FastImageIO extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_SUFFIX
A suffix for use when storing raw images in bundles or on the file system.
|
| Constructor and Description |
|---|
FastImageIO() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canWrite(BufferedImage image)
Returns true if the supplied image is of a format that is supported by the fast image I/O
services, false if not.
|
static BufferedImage |
read(ByteBuffer byteBuffer)
Reads an image from the supplied byte buffer (which must return the image format previously
written via a call to
write(java.awt.image.BufferedImage, java.io.OutputStream)). |
static BufferedImage |
read(File file)
Reads an image from the supplied file (which must contain an image previously written via a
call to
write(java.awt.image.BufferedImage, java.io.OutputStream)). |
static BufferedImage |
read(InputStream in)
Reads an image from the supplied input stream (which must return the image format previously
written via a call to
write(java.awt.image.BufferedImage, java.io.OutputStream)). |
static void |
write(BufferedImage image,
OutputStream out)
Writes the supplied image to the supplied output stream.
|
public static final String FILE_SUFFIX
public static boolean canWrite(BufferedImage image)
public static void write(BufferedImage image, OutputStream out) throws IOException
IOException - thrown if an error occurs writing to the output stream.public static BufferedImage read(File file) throws IOException
write(java.awt.image.BufferedImage, java.io.OutputStream)).IOException - thrown if an error occurs reading from the file.public static BufferedImage read(InputStream in) throws IOException
write(java.awt.image.BufferedImage, java.io.OutputStream)).IOException - thrown if an error occurs reading from the file.public static BufferedImage read(ByteBuffer byteBuffer) throws IOException
write(java.awt.image.BufferedImage, java.io.OutputStream)).IOException - thrown if an error occurs reading from the file.Copyright © 2015. All rights reserved.