Top Inners Fields Constructors Methods
org.jcodings.transcode

public final Class EConv

extends Object
implements EConvFlags
Class Inheritance
All Implemented Interfaces
org.jcodings.transcode.EConvFlags
Static Imports
org.jcodings.util.CaseInsensitiveBytesHash.caseInsensitiveEquals

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Field Summary

Modifier and TypeField and Description
public byte[]
public Encoding
public EConv.EConvElement[]
pack-priv int
pack-priv Buffer
public final EConv.LastError
public Transcoding
pack-priv static final int[]
pack-priv static final byte[]
pack-priv int
public int
public byte[]
public int
public byte[]
public byte[]
public Encoding
pack-priv boolean

Constructor Summary

AccessConstructor and Description
pack-priv
EConv(int nHint)

Method Summary

Modifier and TypeMethod and Description
public boolean
addConverter(byte[] source, byte[] destination, int n)

pack-priv void
addTranscoderAt(Transcoder transcoder, int i)

private static byte[]
allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr)

public void
public void
public 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)

pack-priv boolean
decorateAt(byte[] decorator, int n)

pack-priv boolean
decorateAtFirst(byte[] decorator)

pack-priv boolean
decorateAtLast(byte[] decorator)

pack-priv static boolean
decorator(byte[] source, byte[] destination)

public byte[]
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public int
insertOutput(byte[] str, int strP, int strLen, byte[] strEncoding)

public int
private static boolean
memcmp(byte[] a, byte[] b, int len)

private int
pack-priv int
public void
putback(byte[] bytes, int p, int n)

public int
public int
setReplacement(byte[] str, int p, int len, byte[] encname)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String
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)

Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

destinationback to summary
public byte[] destination
destinationEncodingback to summary
public Encoding destinationEncoding
elementsback to summary
public EConv.EConvElement[] elements
flagsback to summary
pack-priv int flags
inBufback to summary
pack-priv Buffer inBuf
lastErrorback to summary
public final EConv.LastError lastError
lastTranscodingback to summary
public Transcoding lastTranscoding
NULL_POINTERback to summary
pack-priv static final int[] NULL_POINTER
NULL_STRINGback to summary
pack-priv static final byte[] NULL_STRING
numFinishedback to summary
pack-priv int numFinished
numTranscodersback to summary
public int numTranscoders
replacementEncodingback to summary
public byte[] replacementEncoding
replacementLengthback to summary
public int replacementLength
replacementStringback to summary
public byte[] replacementString
sourceback to summary
public byte[] source
sourceEncodingback to summary
public Encoding sourceEncoding
startedback to summary
pack-priv boolean started

Constructor Detail

EConvback to summary
pack-priv EConv(int nHint)

Method Detail

addConverterback to summary
public boolean addConverter(byte[] source, byte[] destination, int n)
addTranscoderAtback to summary
pack-priv void addTranscoderAt(Transcoder transcoder, int i)
allocateConvertedStringback to summary
private static byte[] allocateConvertedString(byte[] source, byte[] destination, byte[] str, int strP, int strLen, byte[] callerDstBuf, Ptr dstLenPtr)
binmodeback to summary
public void binmode()
closeback to summary
public void close()
convertback to summary
public EConvResult convert(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
convertInternalback to summary
private EConvResult convertInternal(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags)
convertInternalResultback to summary
private EConvResult convertInternalResult(EConvResult res, Ptr resultPosition)
decorateAtback to summary
pack-priv boolean decorateAt(byte[] decorator, int n)
decorateAtFirstback to summary
pack-priv boolean decorateAtFirst(byte[] decorator)
decorateAtLastback to summary
pack-priv boolean decorateAtLast(byte[] decorator)
decoratorback to summary
pack-priv static boolean decorator(byte[] source, byte[] destination)
encodingToInsertOutputback to summary
public byte[] encodingToInsertOutput()
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
insertOutputback to summary
public int insertOutput(byte[] str, int strP, int strLen, byte[] strEncoding)
makeReplacementback to summary
public int makeReplacement()
memcmpback to summary
private static boolean memcmp(byte[] a, byte[] b, int len)
outputHexCharrefback to summary
private int outputHexCharref()
outputReplacementCharacterback to summary
pack-priv int outputReplacementCharacter()
putbackback to summary
public void putback(byte[] bytes, int p, int n)
putbackableback to summary
public int putbackable()
setReplacementback to summary
public int setReplacement(byte[] str, int p, int len, byte[] encname)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
toStringFullback to summary
public String toStringFull()
transConvback to summary
private EConvResult transConv(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr)
transConvNeedReportback to summary
private EConvResult transConvNeedReport(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, Ptr resultPositionPtr, int sweepStart, int needReportIndex)
transSweepback to summary
private int transSweep(byte[] in, Ptr inPtr, int inStop, byte[] out, Ptr outPtr, int outStop, int flags, int start)
org.jcodings.transcode back to summary

public final Class EConv.EConvElement

extends Buffer
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv EConvResult
public final Transcoding
Inherited from org.jcodings.transcode.Buffer:
bufEndbufStartbytesdataEnddataStart

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.jcodings.transcode.Buffer:
allocate

Field Detail

lastResultback to summary
pack-priv EConvResult lastResult
transcodingback to summary
public final Transcoding transcoding

Constructor Detail

EConvElementback to summary
pack-priv EConvElement(Transcoding transcoding)

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
org.jcodings.transcode back to summary

public final Class EConv.LastError

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv byte[]
pack-priv byte[]
pack-priv int
pack-priv int
pack-priv Transcoding
pack-priv int
pack-priv EConvResult
pack-priv byte[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
public byte[]
public int
public int
public Transcoding
public int
public EConvResult
public byte[]
pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

destinationback to summary
pack-priv byte[] destination
errorBytesback to summary
pack-priv byte[] errorBytes
errorBytesLengthback to summary
pack-priv int errorBytesLength
errorBytesPback to summary
pack-priv int errorBytesP
errorTranscodingback to summary
pack-priv Transcoding errorTranscoding
readAgainLengthback to summary
pack-priv int readAgainLength
resultback to summary
pack-priv EConvResult result
sourceback to summary
pack-priv byte[] source

Constructor Detail

LastErrorback to summary
public LastError()

Method Detail

getDestinationback to summary
public byte[] getDestination()
getErrorBytesback to summary
public byte[] getErrorBytes()
getErrorBytesLengthback to summary
public int getErrorBytesLength()
getErrorBytesPback to summary
public int getErrorBytesP()
getErrorTranscodingback to summary
public Transcoding getErrorTranscoding()
getReadAgainLengthback to summary
public int getReadAgainLength()
getResultback to summary
public EConvResult getResult()
getSourceback to summary
public byte[] getSource()
resetback to summary
pack-priv void reset()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override