public class Pack
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Pack.Converter |
Modifier and Type | Field and Description |
---|---|
static int[] |
b64_xtable |
static byte[] |
sHexDigits |
Constructor and Description |
---|
Pack() |
Modifier and Type | Method and Description |
---|---|
static void |
decode(ThreadContext context,
Ruby runtime,
java.nio.ByteBuffer encode,
int occurrences,
RubyArray result,
Block block,
Pack.Converter converter)
Deprecated.
|
static IRubyObject |
decode(ThreadContext context,
Ruby runtime,
java.nio.ByteBuffer encode,
int occurrences,
RubyArray result,
Block block,
Pack.Converter converter,
int mode) |
static int |
encode(Ruby runtime,
int occurrences,
ByteList result,
RubyArray list,
int index,
org.jruby.util.Pack.ConverterExecutor converter) |
static void |
encodeUM(Ruby runtime,
ByteList lCurElemString,
int occurrences,
boolean ignoreStar,
char type,
ByteList result) |
static RubyString |
pack(Ruby runtime,
RubyArray list,
ByteList formatString)
Same as pack but defaults tainting of output to false.
|
static RubyString |
pack(ThreadContext context,
RubyArray list,
RubyString formatString,
RubyString buffer) |
static RubyString |
pack(ThreadContext context,
Ruby runtime,
RubyArray list,
RubyString formatString)
Deprecated.
|
static ByteList |
packInt_i(ByteList result,
int s) |
static int |
safeGet(java.nio.ByteBuffer encode) |
static RubyArray |
unpack(Ruby runtime,
ByteList encodedString,
ByteList formatString) |
static RubyArray |
unpack(ThreadContext context,
RubyString encoded,
ByteList formatString) |
static IRubyObject |
unpack1WithBlock(ThreadContext context,
RubyString encoded,
ByteList formatString,
Block block) |
static int |
unpackInt_i(java.nio.ByteBuffer enc) |
static RubyArray |
unpackWithBlock(ThreadContext context,
Ruby runtime,
ByteList encodedString,
ByteList formatString,
Block block)
Deprecated.
|
static RubyArray |
unpackWithBlock(ThreadContext context,
RubyString encoded,
ByteList formatString,
Block block)
Decodes str (which may contain binary data) according to the format
string, returning an array of each value extracted.
|
static int |
utf8Decode(Ruby runtime,
byte[] to,
int p,
int code)
rb_uv_to_utf8
|
public static final byte[] sHexDigits
public static final int[] b64_xtable
public static int unpackInt_i(java.nio.ByteBuffer enc)
public static void encodeUM(Ruby runtime, ByteList lCurElemString, int occurrences, boolean ignoreStar, char type, ByteList result)
public static RubyArray unpack(ThreadContext context, RubyString encoded, ByteList formatString)
context
- encoded
- formatString
- unpackWithBlock(ThreadContext, Ruby, ByteList, ByteList, Block)
public static RubyArray unpackWithBlock(ThreadContext context, RubyString encoded, ByteList formatString, Block block)
*
'') will use up all
remaining elements. sSiIlL
may each be followed by an underscore (``_
'') to use the underlying platform's native size for the specified type; otherwise, it uses a platform-independent consistent size.
Directives for
String#unpack
|
public static IRubyObject unpack1WithBlock(ThreadContext context, RubyString encoded, ByteList formatString, Block block)
@Deprecated public static RubyArray unpackWithBlock(ThreadContext context, Ruby runtime, ByteList encodedString, ByteList formatString, Block block)
public static int utf8Decode(Ruby runtime, byte[] to, int p, int code)
public static int safeGet(java.nio.ByteBuffer encode)
public static IRubyObject decode(ThreadContext context, Ruby runtime, java.nio.ByteBuffer encode, int occurrences, RubyArray result, Block block, Pack.Converter converter, int mode)
public static int encode(Ruby runtime, int occurrences, ByteList result, RubyArray list, int index, org.jruby.util.Pack.ConverterExecutor converter)
public static RubyString pack(Ruby runtime, RubyArray list, ByteList formatString)
@Deprecated public static RubyString pack(ThreadContext context, Ruby runtime, RubyArray list, RubyString formatString)
@Deprecated public static void decode(ThreadContext context, Ruby runtime, java.nio.ByteBuffer encode, int occurrences, RubyArray result, Block block, Pack.Converter converter)
public static RubyString pack(ThreadContext context, RubyArray list, RubyString formatString, RubyString buffer)
Copyright © 2001-2020 JRuby. All Rights Reserved.