Class C40Decoder


  • final class C40Decoder
    extends java.lang.Object
    Decodificador de texto en formato C40.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static char[] C40_BASIC_SET_CHARS
      Juego básico de caracteres C40 (con el espacio cambiado a '<').
      private static char[] C40_SHIFT2_SET_CHARS
      Juego extendido de caracteres C40.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private C40Decoder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String decode​(byte[] c40encoded)
      Decodifica un texto en formato C40 según la ISO 16022:2006 (sección 5.2.5.
      private static int[] parseTwoBytes​(int firstByte, int secondByte)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • C40_BASIC_SET_CHARS

        private static final char[] C40_BASIC_SET_CHARS
        Juego básico de caracteres C40 (con el espacio cambiado a '<').
      • C40_SHIFT2_SET_CHARS

        private static final char[] C40_SHIFT2_SET_CHARS
        Juego extendido de caracteres C40.
    • Constructor Detail

      • C40Decoder

        private C40Decoder()
    • Method Detail

      • decode

        static java.lang.String decode​(byte[] c40encoded)
                                throws java.io.IOException
        Decodifica un texto en formato C40 según la ISO 16022:2006 (sección 5.2.5. anexo C, y tabla C.1.
        Parameters:
        c40encoded - Texto codificado como C40.
        Returns:
        Texto decodificado.
        Throws:
        java.io.IOException - Si no se puede decodificar el texto o este no estaba en formato C40.
      • parseTwoBytes

        private static int[] parseTwoBytes​(int firstByte,
                                           int secondByte)