public class EncodeComponent extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EncodeComponent.Encoding
Class used to enumerate valid encodings
|
| Modifier and Type | Field and Description |
|---|---|
static EncodeComponent.Encoding[] |
ENCODINGS |
static EncodeComponent.Encoding |
PNG
specifies PNG encoding
|
| Constructor and Description |
|---|
EncodeComponent() |
| Modifier and Type | Method and Description |
|---|---|
static void |
encode(EncodeComponent.Encoding encoding,
Component component,
File file)
Invoke this methods on Java components to encode their image into the
specified format
|
static void |
encode(EncodeComponent.Encoding encoding,
Component component,
OutputStream output)
Invoke this methods on Java components to encode their image into the
specified format
|
public static final EncodeComponent.Encoding PNG
public static final EncodeComponent.Encoding[] ENCODINGS
public static void encode(EncodeComponent.Encoding encoding, Component component, OutputStream output) throws IOException, EncoderException
component - component to encodeencoding - type of encoding to use (Currently GIF or PNG)output - stream to which to write the encodingIOException - an io exceptionEncoderException - a special encoder exceptionpublic static void encode(EncodeComponent.Encoding encoding, Component component, File file) throws IOException, EncoderException
component - component to encodeencoding - type of encoding to use (GIF, PNG, JPEG, EPS, PS, PDF,
or PCL)file - file to which to write the encodingIOException - an io exceptionEncoderException - a special encoder exceptionCopyright © 2018. All rights reserved.