Package org.jcodings.transcode
Class TranscodeFunctions
- java.lang.Object
-
- org.jcodings.transcode.TranscodeFunctions
-
public class TranscodeFunctions extends java.lang.ObjectCreated by headius on 3/4/14.
-
-
Field Summary
Fields Modifier and Type Field Description static intBEstatic intEMACS_MULE_LEADING_CODE_JISX0208_1978static intEMACS_MULE_LEADING_CODE_JISX0208_1983private static intESCAPE_ENDprivate static intESCAPE_NORMALstatic intfrom_UTF_16BE_D8toDB_00toFFstatic intfrom_UTF_16LE_00toFF_D8toDBprivate static intfrom_utf8_mac_nfc2static byteG0_ASCIIstatic byteG0_JISX0201_KATAKANAstatic byteG0_JISX0208_1978static byteG0_JISX0208_1983static intiso2022jp_decoder_jisx0208_reststatic intiso2022jp_kddi_decoder_jisx0208_reststatic intLEprivate static intMET_CRprivate static intMET_CRLFprivate static intMET_LFprivate static intNEWLINE_JUST_AFTER_CRprivate static intNEWLINE_NORMALprivate static intSTATUS_BUF_SIZEstatic byte[]tbl0208private static intTOTAL_BUF_SIZE
-
Constructor Summary
Constructors Constructor Description TranscodeFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static intBL_BASE(int nextInfo)private static intBL_INFO(int nextInfo)private static intbufApply(byte[] sp, byte[] o, int oStart)private static bytebufAt(byte[] sp, int pos)private static intbufBeg(byte[] statep)private static voidbufBeg(byte[] statep, int end)private static intbufBegPostInc(byte[] statep)private static intbufBytesize(byte[] p)private static voidbufClear(byte[] state)private static booleanbufEmpty(byte[] sp)private static intbufEnd(byte[] statep)private static voidbufEnd(byte[] statep, int end)private static intbufEndPostInc(byte[] statep)private static intbufInt(byte[] statep, int base)private static voidbufInt(byte[] statep, int base, int val)private static intbufOutputAll(byte[] sp, byte[] o, int oStart)private static intbufOutputChar(byte[] sp, byte[] o, int oStart)private static voidbufPush(byte[] sp, byte[] p, int pStart, int l)private static bytebufShift(byte[] sp)private static intBYTE_ADDR(int index)private static intBYTE_LOOKUP_BASE(int bl)private static intBYTE_LOOKUP_INFO(int bl)static intescapeXmlAttrQuoteFinish(byte[] statep, byte[] o, int oStart, int oSize)static intescapeXmlAttrQuoteInit(byte[] statep)static intfinishCp50220Encoder(byte[] statep, byte[] o, int oStart, int size)static intfinishIso2022jpEncoder(byte[] statep, byte[] o, int oStart, int oSize)static intfinishIso2022jpKddiEncoder(byte[] statep, byte[] o, int oStart, int oSize)static intfromUtf8MacFinish(byte[] statep, byte[] o, int oStart, int oSize)static intfromUtf8MacInit(byte[] state)static intfunSiCp50221Decoder(byte[] statep, byte[] s, int sStart, int l)static intfunSiFromUTF16(byte[] statep, byte[] s, int sStart, int l)static intfunSiFromUTF32(byte[] statep, byte[] s, int sStart, int l)static intfunSiIso2022jpKddiDecoder(byte[] statep, byte[] s, int sStart, int l)static intfunSiIso50220jpDecoder(byte[] statep, byte[] s, int sStart, int l)static intfunSioFromGB18030(byte[] statep, byte[] s, int sStart, int l, int info, byte[] o, int oStart, int osize)static intfunSioToGB18030(byte[] statep, byte[] s, int sStart, int l, int info, byte[] o, int oStart, int osize)static intfunSoCp50220Encoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoCp50221Decoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoCp5022xEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoEscapeXmlAttrQuote(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoEucjp2Sjis(byte[] statep, byte[] s, int sStart, int _l, byte[] o, int oStart, int osize)static intfunSoEucjpToStatelessIso2022jp(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoFromCESU8(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromGB18030(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF16(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF16BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF16LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF32(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF32BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUTF32LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoFromUtf8Mac(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoIso2022jpDecoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoIso2022jpEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoIso2022jpKddiDecoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoIso2022jpKddiEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoSjis2Eucjp(byte[] statep, byte[] s, int sStart, int _l, byte[] o, int oStart, int osize)static intfunSoStatelessIso2022jpToEucjp(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)static intfunSoToCESU8(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToGB18030(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF16(byte[] statep, byte[] sBytes, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF16BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF16LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF32(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF32BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoToUTF32LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)static intfunSoUniversalNewline(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)private static intgetInfo(int nextInfo, byte[] sp)static intiso2022jpEncoderResetSequenceSize(byte[] statep)static intiso2022jpInit(byte[] state)static intiso2022jpKddiEncoderResetSequence_size(byte[] statep)static intiso2022jpKddiInit(byte[] statep)private static voidNEWLINE_NEWLINES_MET(byte[] sp, int b)private static voidNEWLINE_NEWLINES_MET_or_mask(byte[] sp, int b)private static byteNEWLINE_STATE(byte[] sp)private static voidNEWLINE_STATE(byte[] sp, int b)static intuniversalNewlineFinish(byte[] statep, byte[] o, int oStart, int oSize)static intuniversalNewlineInit(byte[] statep)static intUTF8MAC_BL_ACTION(int nextInfo, byte b)static intUTF8MAC_BL_MAX_BYTE(int nextInfo)static intUTF8MAC_BL_MIN_BYTE(int nextInfo)static intUTF8MAC_BL_OFFSET(int nextInfo, int b)private static booleanutf8Trailbyte(byte c)private static intWORD_ADDR(int index)
-
-
-
Field Detail
-
BE
public static final int BE
- See Also:
- Constant Field Values
-
LE
public static final int LE
- See Also:
- Constant Field Values
-
from_UTF_16BE_D8toDB_00toFF
public static final int from_UTF_16BE_D8toDB_00toFF
-
from_UTF_16LE_00toFF_D8toDB
public static final int from_UTF_16LE_00toFF_D8toDB
-
G0_ASCII
public static final byte G0_ASCII
- See Also:
- Constant Field Values
-
G0_JISX0208_1978
public static final byte G0_JISX0208_1978
- See Also:
- Constant Field Values
-
G0_JISX0208_1983
public static final byte G0_JISX0208_1983
- See Also:
- Constant Field Values
-
G0_JISX0201_KATAKANA
public static final byte G0_JISX0201_KATAKANA
- See Also:
- Constant Field Values
-
EMACS_MULE_LEADING_CODE_JISX0208_1978
public static final int EMACS_MULE_LEADING_CODE_JISX0208_1978
- See Also:
- Constant Field Values
-
EMACS_MULE_LEADING_CODE_JISX0208_1983
public static final int EMACS_MULE_LEADING_CODE_JISX0208_1983
- See Also:
- Constant Field Values
-
tbl0208
public static final byte[] tbl0208
-
iso2022jp_decoder_jisx0208_rest
public static final int iso2022jp_decoder_jisx0208_rest
-
iso2022jp_kddi_decoder_jisx0208_rest
public static final int iso2022jp_kddi_decoder_jisx0208_rest
-
STATUS_BUF_SIZE
private static final int STATUS_BUF_SIZE
- See Also:
- Constant Field Values
-
TOTAL_BUF_SIZE
private static final int TOTAL_BUF_SIZE
- See Also:
- Constant Field Values
-
from_utf8_mac_nfc2
private static final int from_utf8_mac_nfc2
-
ESCAPE_END
private static final int ESCAPE_END
- See Also:
- Constant Field Values
-
ESCAPE_NORMAL
private static final int ESCAPE_NORMAL
- See Also:
- Constant Field Values
-
NEWLINE_NORMAL
private static final int NEWLINE_NORMAL
- See Also:
- Constant Field Values
-
NEWLINE_JUST_AFTER_CR
private static final int NEWLINE_JUST_AFTER_CR
- See Also:
- Constant Field Values
-
MET_LF
private static final int MET_LF
- See Also:
- Constant Field Values
-
MET_CRLF
private static final int MET_CRLF
- See Also:
- Constant Field Values
-
MET_CR
private static final int MET_CR
- See Also:
- Constant Field Values
-
-
Method Detail
-
funSoToCESU8
public static int funSoToCESU8(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoFromCESU8
public static int funSoFromCESU8(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF16
public static int funSoToUTF16(byte[] statep, byte[] sBytes, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF16BE
public static int funSoToUTF16BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF16LE
public static int funSoToUTF16LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF32
public static int funSoToUTF32(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF32BE
public static int funSoToUTF32BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoToUTF32LE
public static int funSoToUTF32LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSiFromUTF32
public static int funSiFromUTF32(byte[] statep, byte[] s, int sStart, int l)
-
funSoFromUTF32
public static int funSoFromUTF32(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoFromUTF32BE
public static int funSoFromUTF32BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoFromUTF32LE
public static int funSoFromUTF32LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSiFromUTF16
public static int funSiFromUTF16(byte[] statep, byte[] s, int sStart, int l)
-
funSoFromUTF16
public static int funSoFromUTF16(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoFromUTF16BE
public static int funSoFromUTF16BE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoFromUTF16LE
public static int funSoFromUTF16LE(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSoEucjp2Sjis
public static int funSoEucjp2Sjis(byte[] statep, byte[] s, int sStart, int _l, byte[] o, int oStart, int osize)
-
funSoSjis2Eucjp
public static int funSoSjis2Eucjp(byte[] statep, byte[] s, int sStart, int _l, byte[] o, int oStart, int osize)
-
funSoFromGB18030
public static int funSoFromGB18030(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSioFromGB18030
public static int funSioFromGB18030(byte[] statep, byte[] s, int sStart, int l, int info, byte[] o, int oStart, int osize)
-
funSoToGB18030
public static int funSoToGB18030(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int osize)
-
funSioToGB18030
public static int funSioToGB18030(byte[] statep, byte[] s, int sStart, int l, int info, byte[] o, int oStart, int osize)
-
iso2022jpInit
public static int iso2022jpInit(byte[] state)
-
funSoCp50220Encoder
public static int funSoCp50220Encoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
funSoCp5022xEncoder
public static int funSoCp5022xEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
finishCp50220Encoder
public static int finishCp50220Encoder(byte[] statep, byte[] o, int oStart, int size)
-
iso2022jpEncoderResetSequenceSize
public static int iso2022jpEncoderResetSequenceSize(byte[] statep)
-
funSiIso50220jpDecoder
public static int funSiIso50220jpDecoder(byte[] statep, byte[] s, int sStart, int l)
-
funSoIso2022jpDecoder
public static int funSoIso2022jpDecoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
funSoStatelessIso2022jpToEucjp
public static int funSoStatelessIso2022jpToEucjp(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
funSoEucjpToStatelessIso2022jp
public static int funSoEucjpToStatelessIso2022jp(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
funSoIso2022jpEncoder
public static int funSoIso2022jpEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
finishIso2022jpEncoder
public static int finishIso2022jpEncoder(byte[] statep, byte[] o, int oStart, int oSize)
-
funSiCp50221Decoder
public static int funSiCp50221Decoder(byte[] statep, byte[] s, int sStart, int l)
-
funSoCp50221Decoder
public static int funSoCp50221Decoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
iso2022jpKddiInit
public static int iso2022jpKddiInit(byte[] statep)
-
funSiIso2022jpKddiDecoder
public static int funSiIso2022jpKddiDecoder(byte[] statep, byte[] s, int sStart, int l)
-
funSoIso2022jpKddiDecoder
public static int funSoIso2022jpKddiDecoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
funSoIso2022jpKddiEncoder
public static int funSoIso2022jpKddiEncoder(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
finishIso2022jpKddiEncoder
public static int finishIso2022jpKddiEncoder(byte[] statep, byte[] o, int oStart, int oSize)
-
iso2022jpKddiEncoderResetSequence_size
public static int iso2022jpKddiEncoderResetSequence_size(byte[] statep)
-
fromUtf8MacInit
public static int fromUtf8MacInit(byte[] state)
-
bufBytesize
private static final int bufBytesize(byte[] p)
-
bufAt
private static final byte bufAt(byte[] sp, int pos)
-
bufClear
private static void bufClear(byte[] state)
-
funSoFromUtf8Mac
public static int funSoFromUtf8Mac(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
bufPush
private static void bufPush(byte[] sp, byte[] p, int pStart, int l)
-
bufApply
private static int bufApply(byte[] sp, byte[] o, int oStart)
-
bufEmpty
private static boolean bufEmpty(byte[] sp)
-
bufShift
private static byte bufShift(byte[] sp)
-
utf8Trailbyte
private static boolean utf8Trailbyte(byte c)
-
bufOutputChar
private static int bufOutputChar(byte[] sp, byte[] o, int oStart)
-
getInfo
private static int getInfo(int nextInfo, byte[] sp)
-
UTF8MAC_BL_MIN_BYTE
public static int UTF8MAC_BL_MIN_BYTE(int nextInfo)
-
UTF8MAC_BL_MAX_BYTE
public static int UTF8MAC_BL_MAX_BYTE(int nextInfo)
-
UTF8MAC_BL_OFFSET
public static int UTF8MAC_BL_OFFSET(int nextInfo, int b)
-
UTF8MAC_BL_ACTION
public static int UTF8MAC_BL_ACTION(int nextInfo, byte b)
-
BL_BASE
private static int BL_BASE(int nextInfo)
-
BL_INFO
private static int BL_INFO(int nextInfo)
-
BYTE_ADDR
private static int BYTE_ADDR(int index)
-
WORD_ADDR
private static int WORD_ADDR(int index)
-
BYTE_LOOKUP_BASE
private static int BYTE_LOOKUP_BASE(int bl)
-
BYTE_LOOKUP_INFO
private static int BYTE_LOOKUP_INFO(int bl)
-
bufInt
private static int bufInt(byte[] statep, int base)
-
bufInt
private static void bufInt(byte[] statep, int base, int val)
-
bufBeg
private static int bufBeg(byte[] statep)
-
bufEnd
private static int bufEnd(byte[] statep)
-
bufBeg
private static void bufBeg(byte[] statep, int end)
-
bufEnd
private static void bufEnd(byte[] statep, int end)
-
bufEndPostInc
private static int bufEndPostInc(byte[] statep)
-
bufBegPostInc
private static int bufBegPostInc(byte[] statep)
-
fromUtf8MacFinish
public static int fromUtf8MacFinish(byte[] statep, byte[] o, int oStart, int oSize)
-
bufOutputAll
private static int bufOutputAll(byte[] sp, byte[] o, int oStart)
-
escapeXmlAttrQuoteInit
public static int escapeXmlAttrQuoteInit(byte[] statep)
-
funSoEscapeXmlAttrQuote
public static int funSoEscapeXmlAttrQuote(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
escapeXmlAttrQuoteFinish
public static int escapeXmlAttrQuoteFinish(byte[] statep, byte[] o, int oStart, int oSize)
-
NEWLINE_STATE
private static byte NEWLINE_STATE(byte[] sp)
-
NEWLINE_STATE
private static void NEWLINE_STATE(byte[] sp, int b)
-
NEWLINE_NEWLINES_MET
private static void NEWLINE_NEWLINES_MET(byte[] sp, int b)
-
NEWLINE_NEWLINES_MET_or_mask
private static void NEWLINE_NEWLINES_MET_or_mask(byte[] sp, int b)
-
universalNewlineInit
public static int universalNewlineInit(byte[] statep)
-
funSoUniversalNewline
public static int funSoUniversalNewline(byte[] statep, byte[] s, int sStart, int l, byte[] o, int oStart, int oSize)
-
universalNewlineFinish
public static int universalNewlineFinish(byte[] statep, byte[] o, int oStart, int oSize)
-
-