view src/org/tn5250j/encoding/ICodePage.java @ 250:2bf2724d8610

add range checking on get/set fields
author Carl Byington <carl@five-ten-sg.com>
date Mon, 14 Jul 2014 12:21:43 -0700
parents 77ac18bc1b2f
children
line wrap: on
line source

package org.tn5250j.encoding;

public interface ICodePage {

    /**
     * Convert a single byte (or maybe more bytes which representing one character) to a Unicode character.
     *
     * @param index
     * @return
     */
    public abstract char ebcdic2uni(int index);

    /**
     * Convert a Unicode character in it's byte representation.
     * Therefore, only 8bit codepages are supported.
     *
     * @param index
     * @return
     */
    public abstract byte uni2ebcdic(char index);

}