public class CharsetTranscoder extends Transcoder
Modifier and Type | Class and Description |
---|---|
static class |
CharsetTranscoder.CodingActions |
class |
CharsetTranscoder.TranscoderEngine |
Modifier and Type | Field and Description |
---|---|
static Set<Charset> |
UNICODE_CHARSETS |
static String[] |
XMLAttrCharacterTranslator |
static String[] |
XMLTextCharacterTranslator |
inEncoding, lastResult, outEncoding, runtime
Constructor and Description |
---|
CharsetTranscoder(ThreadContext context,
org.jcodings.Encoding outEncoding,
org.jcodings.Encoding inEncoding) |
CharsetTranscoder(ThreadContext context,
org.jcodings.Encoding outEncoding,
org.jcodings.Encoding inEncoding,
CharsetTranscoder.CodingActions actions) |
CharsetTranscoder(ThreadContext context,
org.jcodings.Encoding outEncoding,
org.jcodings.Encoding inEncoding,
int flags,
IRubyObject replace) |
Modifier and Type | Method and Description |
---|---|
org.jruby.util.ByteList |
convert(ThreadContext context,
org.jruby.util.ByteList value,
boolean is7BitASCII) |
org.jruby.util.ByteList |
econvStrConvert(ThreadContext context,
org.jruby.util.ByteList value,
boolean finish) |
org.jruby.util.ByteList |
finish(org.jcodings.Encoding altEncoding) |
CharsetTranscoder.CodingActions |
getCodingErrorActions() |
RaiseException |
getLastError() |
RubyCoderResult |
getLastResult() |
String |
getReplaceWith() |
static CharsetTranscoder |
open(ThreadContext context,
byte[] sourceEncoding,
byte[] destinationEncoding,
int flags,
IRubyObject replace) |
RubyCoderResult |
primitiveConvert(ThreadContext context,
org.jruby.util.ByteList inBuffer,
org.jruby.util.ByteList outBuffer,
int outOffset,
int outLimit,
org.jcodings.Encoding inEncoding,
boolean is7BitASCII,
int flags) |
static CharsetTranscoder.CodingActions |
processCodingErrorActions(ThreadContext context,
int flags,
IRubyObject replace) |
static CharsetTranscoder.CodingActions |
processCodingErrorActions(ThreadContext context,
IRubyObject opts) |
static String |
stringFromCoderResult(CoderResult coderResult,
int flags,
boolean binaryToCharacter) |
static org.jruby.util.ByteList |
strTranscode(ThreadContext context,
RubyString self,
org.jcodings.Encoding fromEncoding,
org.jcodings.Encoding toEncoding,
IRubyObject opt) |
static org.jruby.util.ByteList |
strTranscode0(ThreadContext context,
RubyString self,
org.jcodings.Encoding senc,
org.jcodings.Encoding denc,
int ecflags,
IRubyObject ecopts) |
org.jruby.util.ByteList |
transcode(ThreadContext context,
org.jruby.util.ByteList value) |
org.jruby.util.ByteList |
transcode(ThreadContext context,
org.jruby.util.ByteList value,
boolean is7BitASCII) |
RubyCoderResult |
transcode(ThreadContext context,
org.jruby.util.ByteList value,
org.jruby.util.ByteList dest) |
static org.jruby.util.ByteList |
transcode(ThreadContext context,
org.jruby.util.ByteList value,
org.jcodings.Encoding fromEncoding,
org.jcodings.Encoding toEncoding,
IRubyObject opts)
This will try and transcode the supplied ByteList to the supplied toEncoding.
|
static org.jruby.util.ByteList |
transcode(ThreadContext context,
org.jruby.util.ByteList value,
org.jcodings.Encoding fromEncoding,
org.jcodings.Encoding toEncoding,
IRubyObject opts,
boolean is7BitASCII) |
static Charset |
transcodeCharsetFor(Ruby runtime,
byte[] name,
org.jcodings.Encoding encoding,
boolean is7Bit) |
open0, strConvEnc, strConvEncOpts
public static final String[] XMLTextCharacterTranslator
public static final String[] XMLAttrCharacterTranslator
public CharsetTranscoder(ThreadContext context, org.jcodings.Encoding outEncoding, org.jcodings.Encoding inEncoding)
public CharsetTranscoder(ThreadContext context, org.jcodings.Encoding outEncoding, org.jcodings.Encoding inEncoding, int flags, IRubyObject replace)
public CharsetTranscoder(ThreadContext context, org.jcodings.Encoding outEncoding, org.jcodings.Encoding inEncoding, CharsetTranscoder.CodingActions actions)
public static CharsetTranscoder open(ThreadContext context, byte[] sourceEncoding, byte[] destinationEncoding, int flags, IRubyObject replace)
public static org.jruby.util.ByteList transcode(ThreadContext context, org.jruby.util.ByteList value, org.jcodings.Encoding fromEncoding, org.jcodings.Encoding toEncoding, IRubyObject opts)
public static org.jruby.util.ByteList transcode(ThreadContext context, org.jruby.util.ByteList value, org.jcodings.Encoding fromEncoding, org.jcodings.Encoding toEncoding, IRubyObject opts, boolean is7BitASCII)
public static org.jruby.util.ByteList strTranscode(ThreadContext context, RubyString self, org.jcodings.Encoding fromEncoding, org.jcodings.Encoding toEncoding, IRubyObject opt)
public static org.jruby.util.ByteList strTranscode0(ThreadContext context, RubyString self, org.jcodings.Encoding senc, org.jcodings.Encoding denc, int ecflags, IRubyObject ecopts)
public RubyCoderResult transcode(ThreadContext context, org.jruby.util.ByteList value, org.jruby.util.ByteList dest)
transcode
in class Transcoder
public org.jruby.util.ByteList transcode(ThreadContext context, org.jruby.util.ByteList value)
transcode
in class Transcoder
public org.jruby.util.ByteList transcode(ThreadContext context, org.jruby.util.ByteList value, boolean is7BitASCII)
transcode
in class Transcoder
public org.jruby.util.ByteList convert(ThreadContext context, org.jruby.util.ByteList value, boolean is7BitASCII)
convert
in class Transcoder
public org.jruby.util.ByteList econvStrConvert(ThreadContext context, org.jruby.util.ByteList value, boolean finish)
econvStrConvert
in class Transcoder
public RubyCoderResult primitiveConvert(ThreadContext context, org.jruby.util.ByteList inBuffer, org.jruby.util.ByteList outBuffer, int outOffset, int outLimit, org.jcodings.Encoding inEncoding, boolean is7BitASCII, int flags)
primitiveConvert
in class Transcoder
public org.jruby.util.ByteList finish(org.jcodings.Encoding altEncoding)
finish
in class Transcoder
public RubyCoderResult getLastResult()
getLastResult
in class Transcoder
public RaiseException getLastError()
getLastError
in class Transcoder
public String getReplaceWith()
public static String stringFromCoderResult(CoderResult coderResult, int flags, boolean binaryToCharacter)
public CharsetTranscoder.CodingActions getCodingErrorActions()
public static CharsetTranscoder.CodingActions processCodingErrorActions(ThreadContext context, int flags, IRubyObject replace)
public static CharsetTranscoder.CodingActions processCodingErrorActions(ThreadContext context, IRubyObject opts)
Copyright © 2001-2014 JRuby. All Rights Reserved.