Package com.isode.x400.highlevel
Class BodypartTeletex
- java.lang.Object
-
- com.isode.x400.highlevel.Bodypart
-
- com.isode.x400.highlevel.BodypartTeletex
-
public class BodypartTeletex extends Bodypart
This class represents a Teletex bodypart.general-text body part containing arbitrary character sets. Can only be used as a Body part object. Must set the character set codes in the parameters, and the correct escape sequences to switch in the character sets in the data.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.isode.x400.highlevel.Bodypart
Bodypart.Bodypart_Type
-
-
Field Summary
-
Fields inherited from class com.isode.x400.highlevel.Bodypart
bodypart_size, bodypart_type
-
-
Constructor Summary
Constructors Constructor Description BodypartTeletex(BodyPart bp_obj)
Constructor based on an existing bodypart object, for example, one read from an existing message.BodypartTeletex(java.lang.String ct)
Constructor based on data provided by the user
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSize()
Returns the size, in bytes, of the message bodypart.java.lang.String
getStringRepresentation()
Returns the string representation of this message bodypart.java.lang.String
getTextContent()
Returns the content of this Teletex bodypartvoid
saveBP(java.lang.String filename)
Save this Bodypart to a file.void
setContentFromFile(java.lang.String file)
Sets the content of this Teletex bodypartvoid
setSize(int s)
Sets the size of message bodypart in bytes.void
setTextContent(java.lang.String ct)
Sets the content of this Teletex bodypart-
Methods inherited from class com.isode.x400.highlevel.Bodypart
getBodypartObject, getByteParam, getIntParam, getStringParam, getType, getTypeAsString, setByteParam, setIntParam, setStringParam
-
-
-
-
Constructor Detail
-
BodypartTeletex
public BodypartTeletex(BodyPart bp_obj) throws X400APIException
Constructor based on an existing bodypart object, for example, one read from an existing message.- Parameters:
bp_obj
-- Throws:
X400APIException
-
BodypartTeletex
public BodypartTeletex(java.lang.String ct) throws X400APIException
Constructor based on data provided by the user- Parameters:
ct
-- Throws:
X400APIException
-
-
Method Detail
-
getTextContent
public java.lang.String getTextContent() throws X400APIException
Returns the content of this Teletex bodypart- Throws:
X400APIException
-
setTextContent
public void setTextContent(java.lang.String ct) throws X400APIException
Sets the content of this Teletex bodypart- Parameters:
ct
-- Throws:
X400APIException
-
setContentFromFile
public void setContentFromFile(java.lang.String file) throws X400APIException
Sets the content of this Teletex bodypart- Parameters:
file
-- Throws:
X400APIException
-
getStringRepresentation
public java.lang.String getStringRepresentation() throws X400APIException
Returns the string representation of this message bodypart.- Throws:
X400APIException
-
getSize
public int getSize()
Returns the size, in bytes, of the message bodypart.- Overrides:
getSize
in classBodypart
- Throws:
X400APIException
-
setSize
public void setSize(int s)
Sets the size of message bodypart in bytes.
-
saveBP
public void saveBP(java.lang.String filename) throws X400APIException
Description copied from class:Bodypart
Save this Bodypart to a file. Only a subset of supported bodyparts can be saved to a file at present. These include:
BODYPART_IA5_TEXT
BODYPART_BINARY
BODYPART_FTBP- Overrides:
saveBP
in classBodypart
- Parameters:
filename
- : the file where to save the bodypart- Throws:
X400APIException
-
-