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.

  • Constructor Details

    • 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(String ct) throws X400APIException
      Constructor based on data provided by the user
      Parameters:
      ct -
      Throws:
      X400APIException
  • Method Details

    • getTextContent

      public String getTextContent() throws X400APIException
      Returns the content of this Teletex bodypart
      Throws:
      X400APIException
    • setTextContent

      public void setTextContent(String ct) throws X400APIException
      Sets the content of this Teletex bodypart
      Parameters:
      ct -
      Throws:
      X400APIException
    • setContentFromFile

      public void setContentFromFile(String file) throws X400APIException
      Sets the content of this Teletex bodypart
      Parameters:
      file -
      Throws:
      X400APIException
    • getStringRepresentation

      public 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 class 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(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