Class EConv
java.lang.Object
org.jcodings.transcode.EConv
- All Implemented Interfaces:
EConvFlags
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionbyte[](package private) int(package private) Bufferfinal EConv.LastError(package private) static final int[](package private) static final byte[](package private) intintbyte[]intbyte[]byte[](package private) booleanFields inherited from interface EConvFlags
AFTER_OUTPUT, CR_NEWLINE_DECORATOR, CRLF_NEWLINE_DECORATOR, DECORATOR_MASK, ERROR_HANDLER_MASK, INVALID_MASK, INVALID_REPLACE, MAX_ECFLAGS_DECORATORS, NEWLINE_DECORATOR_MASK, NEWLINE_DECORATOR_READ_MASK, NEWLINE_DECORATOR_WRITE_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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddConverter(byte[] source, byte[] destination, int n) (package private) voidaddTranscoderAt(Transcoder transcoder, int i) private static byte[]allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr) voidbinmode()voidclose()private EConvResultconvertInternal(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags) private EConvResultconvertInternalResult(EConvResult res, Ptr resultPosition) (package private) booleandecorateAt(byte[] decorator, int n) (package private) booleandecorateAtFirst(byte[] decorator) (package private) booleandecorateAtLast(byte[] decorator) (package private) static booleandecorator(byte[] source, byte[] destination) byte[]booleanintinsertOutput(byte[] str, int strP, int strLen, byte[] strEncoding) intprivate static booleanmemcmp(byte[] a, byte[] b, int len) private int(package private) intvoidputback(byte[] bytes, int p, int n) intintsetReplacement(byte[] str, int p, int len, byte[] encname) toString()private EConvResulttransConv(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr) private EConvResulttransConvNeedReport(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr, int sweepStart, int needReportIndex) private inttransSweep(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, int start)
-
Field Details
-
flags
int flags -
source
public byte[] source -
destination
public byte[] destination -
started
boolean started -
replacementString
public byte[] replacementString -
replacementLength
public int replacementLength -
replacementEncoding
public byte[] replacementEncoding -
inBuf
Buffer inBuf -
elements
-
numTranscoders
public int numTranscoders -
numFinished
int numFinished -
lastTranscoding
-
lastError
-
sourceEncoding
-
destinationEncoding
-
NULL_STRING
static final byte[] NULL_STRING -
NULL_POINTER
static final int[] NULL_POINTER
-
-
Constructor Details
-
EConv
EConv(int nHint)
-
-
Method Details
-
toString
-
decorator
static boolean decorator(byte[] source, byte[] destination) -
addTranscoderAt
-
transSweep
-
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
-
convert
public EConvResult convert(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags) -
outputHexCharref
private int outputHexCharref() -
encodingToInsertOutput
public byte[] encodingToInsertOutput() -
allocateConvertedString
private static byte[] allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr) -
insertOutput
public int insertOutput(byte[] str, int strP, int strLen, byte[] strEncoding) -
close
public void close() -
putbackable
public int putbackable() -
putback
public void putback(byte[] bytes, int p, int n) -
addConverter
public 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
public void binmode() -
makeReplacement
public int makeReplacement() -
setReplacement
public int setReplacement(byte[] str, int p, int len, byte[] encname) -
outputReplacementCharacter
int outputReplacementCharacter() -
toStringFull
-
equals
-
memcmp
private static boolean memcmp(byte[] a, byte[] b, int len)
-