public class HtmlImage
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BITMAP_BMP
The picture's data is a bmp/dib file.
|
static int |
BITMAP_EMF
The picture's data is a emf file.
|
static int |
BITMAP_EMZ
The picture's data is a compressed emf file.
|
static int |
BITMAP_GIF
The picture's data is a gif file.
|
static int |
BITMAP_JPG
The picture's data is a jpeg file.
|
static int |
BITMAP_PNG
The picture's data is a png file.
|
static int |
BITMAP_TIF
The picture's data is a tiff file.
|
static int |
BITMAP_UNKNOWN
Do not know the bitmap type.
|
static int |
BITMAP_WMF
The picture's data is a wmf file.
|
static int |
BITMAP_WMZ
The picture's data is a compressed wmf file.
|
static int |
RENDER_EPS
An EPS snippet.
|
static int |
RENDER_PDF
A PDF snippet.
|
static int |
RENDER_SVG
A SVG file.
|
Constructor and Description |
---|
HtmlImage()
Create an object with no name and a ByteArrayOutputStream stream.
|
HtmlImage(boolean embedded)
Create an HtmlImage; this constructor is intended for embedded HtmlImages.
|
HtmlImage(java.lang.String fileName)
Create an object with the passed in name and no stream.
|
HtmlImage(java.lang.String fileName,
java.io.OutputStream fileStream)
Create an object with the passed in name and stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
didWrite()
True if the image is written, that is the image contains data.
|
int |
getBitmapType()
Get the type of picture this is.
|
java.lang.String |
getName()
Get the filename for this image object.
|
java.io.OutputStream |
getStream()
Get the stream that contains the binary image of the file.
|
static boolean |
isMetafile(int bitmapType)
Returns true if the passed in bitmap type is a metafile.
|
void |
setBitmapType(int typ)
Set the type of picture this is.
|
static int |
stringToType(java.lang.String ext)
Convert the file extension to the int type.
|
static int |
stringToTypeNoError(java.lang.String ext)
Convert the file extension to the int type.
|
static java.lang.String |
typeToStr(int type)
For a HtmlImage.BITMAP_ type, return the extension (no period).
|
public static final int BITMAP_UNKNOWN
public static final int BITMAP_PNG
public static final int BITMAP_JPG
public static final int BITMAP_TIF
public static final int BITMAP_BMP
public static final int BITMAP_GIF
public static final int BITMAP_WMF
public static final int BITMAP_WMZ
public static final int BITMAP_EMF
public static final int BITMAP_EMZ
public static final int RENDER_SVG
public static final int RENDER_PDF
public static final int RENDER_EPS
public HtmlImage()
public HtmlImage(java.lang.String fileName, java.io.OutputStream fileStream)
fileName
- The name for this file. If set to "" or null, then the processor
will create a filename for this image.fileStream
- The stream to write this image to. If null, the image will not
be written to the stream.public HtmlImage(java.lang.String fileName)
fileName
- The name for this file. If set to "" or null, then the processor
will create a filename for this image.public HtmlImage(boolean embedded)
embedded
- true if the image will be embedded in HTML/CSSpublic java.lang.String getName()
public static boolean isMetafile(int bitmapType)
bitmapType
- The BITMAP_* bitmap type.public void setBitmapType(int typ)
typ
- Set to BITMAP_PNG or BITMAP_JPGpublic int getBitmapType()
public java.io.OutputStream getStream()
public static int stringToType(java.lang.String ext)
ext
- The file extensionpublic static int stringToTypeNoError(java.lang.String ext)
ext
- The file extensionpublic static java.lang.String typeToStr(int type)
type
- The type.public boolean didWrite()
Copyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software