Class InputToken

java.lang.Object
com.pnfsoftware.jeb.util.interpreter.InputToken

public class InputToken extends Object
An input token used in a command.
  • Constructor Details

    • InputToken

      public InputToken(String value, boolean needsUnescaping)
      Create an input token.
      Parameters:
      value - token value
      needsUnescaping - true if escape sequences should be decoded by getBytes()
    • InputToken

      public InputToken(String value)
      Create an input token that does not need unescaping.
      Parameters:
      value - token value
  • Method Details

    • getValue

      public String getValue()
      Get the token value.
      Returns:
      token value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • needsUnespaping

      public boolean needsUnespaping()
      Determine whether this token should be unescaped when converted to bytes.
      Returns:
      true if escape sequences should be decoded by getBytes()
    • getBytes

      public byte[] getBytes() throws UnsupportedEncodingException
      Convert this token to bytes.
      Returns:
      token bytes
      Throws:
      UnsupportedEncodingException - if the token contains unsupported escaped content