Class 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.

    • 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

      • 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
      • setSize

        public void setSize​(int s)
        Sets the size of message bodypart in bytes.
        Overrides:
        setSize in class Bodypart
      • 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 class Bodypart
        Parameters:
        filename - : the file where to save the bodypart
        Throws:
        X400APIException