public class ImageUtility
extends java.lang.Object
Copyright: Copyright (c) 2004-2014, David Read
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Modifier and Type | Field and Description |
---|---|
private static int |
BLOCK_READ_SIZE
The block size when loading images
|
private static ImageUtility |
instance
The instance of this class - a Singleton
|
private static org.apache.log4j.Logger |
LOGGER
Logger
|
Modifier | Constructor and Description |
---|---|
private |
ImageUtility()
Constructor is private for singleton.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
getImageAsByteArray(java.lang.String saImageName)
Get the image as a byte array.
|
static java.io.InputStream |
getImageAsStream(java.lang.String saImageName)
Get the image as a stream.
|
static java.net.URL |
getImageAsURL(java.lang.String saImageName)
Get the image as a URL.
|
private static ImageUtility |
instance()
Get the instance of this singleton, private as only the static utility
methods can have access to the class.
|
private static ImageUtility instance
private static final org.apache.log4j.Logger LOGGER
private static final int BLOCK_READ_SIZE
private static ImageUtility instance()
public static java.io.InputStream getImageAsStream(java.lang.String saImageName)
saImageName
- The file name of the image to be loaded.public static byte[] getImageAsByteArray(java.lang.String saImageName)
saImageName
- The file name of the image to be loaded.public static java.net.URL getImageAsURL(java.lang.String saImageName)
saImageName
- The file name of the image to be loaded.