Package org.jcodings.transcode
Class EConv
- java.lang.Object
-
- org.jcodings.transcode.EConv
-
- All Implemented Interfaces:
EConvFlags
public final class EConv extends java.lang.Object implements EConvFlags
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
EConv.EConvElement
(package private) static class
EConv.LastError
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]
destination
(package private) EConv.EConvElement[]
elements
(package private) int
flags
(package private) Buffer
inBuf
(package private) EConv.LastError
lastError
(package private) Transcoding
lastTranscoding
(package private) static int[]
NULL_POINTER
(package private) static byte[]
NULL_STRING
(package private) int
numFinished
(package private) int
numTranscoders
(package private) byte[]
replacementEncoding
(package private) int
replacementLength
(package private) byte[]
replacementString
(package private) byte[]
source
(package private) boolean
started
-
Fields inherited from interface org.jcodings.transcode.EConvFlags
AFTER_OUTPUT, CR_NEWLINE_DECORATOR, CRLF_NEWLINE_DECORATOR, DECORATOR_MASK, ERROR_HANDLER_MASK, INVALID_MASK, INVALID_REPLACE, MAX_ECFLAGS_DECORATORS, NEWLINE_DECORATOR_MASK, PARTIAL_INPUT, STATEFUL_DECORATOR_MASK, UNDEF_HEX_CHARREF, UNDEF_MASK, UNDEF_REPLACE, UNIVERSAL_NEWLINE_DECORATOR, XML_ATTR_CONTENT_DECORATOR, XML_ATTR_QUOTE_DECORATOR, XML_TEXT_DECORATOR
-
-
Constructor Summary
Constructors Constructor Description EConv(int nHint)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
addConverter(byte[] source, byte[] destination, int n)
(package private) void
addTranscoderAt(Transcoder transcoder, int i)
private static byte[]
allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr)
private void
binmode()
(package private) void
close()
private EConvResult
convert(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
private EConvResult
convertInternal(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
private EConvResult
convertInternalResult(EConvResult res, Ptr resultPosition)
(package private) boolean
decorateAt(byte[] decorator, int n)
(package private) boolean
decorateAtFirst(byte[] decorator)
(package private) boolean
decorateAtLast(byte[] decorator)
(package private) static boolean
decorator(byte[] source, byte[] destination)
private byte[]
encodingToInsertOutput()
(package private) int
insertOuput(byte[] str, int strLen, byte[] strEncoding)
private int
makeReplacement()
private int
outputHexCharref()
(package private) int
outputReplacementCharacter()
(package private) void
putback(byte[] bytes, int p, int len)
(package private) int
putbackable()
(package private) int
setReplacement(byte[] str, int p, int len, byte[] encname)
java.lang.String
toString()
java.lang.String
toStringFull()
private EConvResult
transConv(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr)
private EConvResult
transConvNeedReport(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr, int sweepStart, int needReportIndex)
private int
transSweep(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, int start)
-
-
-
Field Detail
-
flags
int flags
-
source
byte[] source
-
destination
byte[] destination
-
started
boolean started
-
replacementString
byte[] replacementString
-
replacementLength
int replacementLength
-
replacementEncoding
byte[] replacementEncoding
-
inBuf
Buffer inBuf
-
elements
EConv.EConvElement[] elements
-
numTranscoders
int numTranscoders
-
numFinished
int numFinished
-
lastTranscoding
Transcoding lastTranscoding
-
lastError
final EConv.LastError lastError
-
NULL_STRING
static final byte[] NULL_STRING
-
NULL_POINTER
static final int[] NULL_POINTER
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
decorator
static boolean decorator(byte[] source, byte[] destination)
-
addTranscoderAt
void addTranscoderAt(Transcoder transcoder, int i)
-
transSweep
private int transSweep(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, int start)
-
transConv
private EConvResult transConv(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr)
-
transConvNeedReport
private EConvResult transConvNeedReport(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr, int sweepStart, int needReportIndex)
-
convertInternal
private EConvResult convertInternal(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
-
convertInternalResult
private EConvResult convertInternalResult(EConvResult res, Ptr resultPosition)
-
convert
private EConvResult convert(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
-
outputHexCharref
private int outputHexCharref()
-
encodingToInsertOutput
private byte[] encodingToInsertOutput()
-
allocateConvertedString
private static byte[] allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr)
-
insertOuput
int insertOuput(byte[] str, int strLen, byte[] strEncoding)
-
close
void close()
-
putbackable
int putbackable()
-
putback
void putback(byte[] bytes, int p, int len)
-
addConverter
boolean addConverter(byte[] source, byte[] destination, int n)
-
decorateAt
boolean decorateAt(byte[] decorator, int n)
-
decorateAtFirst
boolean decorateAtFirst(byte[] decorator)
-
decorateAtLast
boolean decorateAtLast(byte[] decorator)
-
binmode
private void binmode()
-
makeReplacement
private int makeReplacement()
-
setReplacement
int setReplacement(byte[] str, int p, int len, byte[] encname)
-
outputReplacementCharacter
int outputReplacementCharacter()
-
toStringFull
public java.lang.String toStringFull()
-
-