Package org.tn5250j.tools.encoder
Class EncodeComponent
- java.lang.Object
-
- org.tn5250j.tools.encoder.EncodeComponent
-
public class EncodeComponent extends java.lang.ObjectUsed to encode components into different image file formats. ie .GIF and .PNG
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEncodeComponent.EncodingClass used to enumerate valid encodings
-
Field Summary
Fields Modifier and Type Field Description static EncodeComponent.Encoding[]ENCODINGSstatic EncodeComponent.EncodingPNGspecifies PNG encoding
-
Constructor Summary
Constructors Constructor Description EncodeComponent()
-
Method Summary
Modifier and Type Method Description static voidencode(EncodeComponent.Encoding encoding, java.awt.Component component, java.io.File file)Invoke this methods on Java components to encode their image into the specified formatstatic voidencode(EncodeComponent.Encoding encoding, java.awt.Component component, java.io.OutputStream output)Invoke this methods on Java components to encode their image into the specified format
-
-
-
Field Detail
-
PNG
public static final EncodeComponent.Encoding PNG
specifies PNG encoding
-
ENCODINGS
public static final EncodeComponent.Encoding[] ENCODINGS
-
-
Method Detail
-
encode
public static void encode(EncodeComponent.Encoding encoding, java.awt.Component component, java.io.OutputStream output) throws java.io.IOException, EncoderException
Invoke this methods on Java components to encode their image into the specified format- Parameters:
component- component to encodeencoding- type of encoding to use (Currently GIF or PNG)output- stream to which to write the encoding- Throws:
java.io.IOException- an io exceptionEncoderException- a special encoder exception
-
encode
public static void encode(EncodeComponent.Encoding encoding, java.awt.Component component, java.io.File file) throws java.io.IOException, EncoderException
Invoke this methods on Java components to encode their image into the specified format- Parameters:
component- component to encodeencoding- type of encoding to use (GIF, PNG, JPEG, EPS, PS, PDF, or PCL)file- file to which to write the encoding- Throws:
java.io.IOException- an io exceptionEncoderException- a special encoder exception
-
-