Top Inners Fields Constructors Methods
org.jruby

public Class RubyIOBuffer

extends RubyObject
Class Inheritance
Imports
jnr.ffi.NativeType, .Platform, .Runtime, .Type, org.jcodings.Encoding, org.jcodings.specific.ASCIIEncoding, org.jruby.anno.JRubyConstant, .JRubyMethod, org.jruby.runtime.Arity, .Block, .Helpers, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.util.ByteList, org.jruby.util.io.ChannelFD, .OpenFile, java.io.IOException, java.math.BigInteger, java.nio.ByteBuffer, .ByteOrder, java.nio.channels.FileChannel, java.util.Arrays

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private ByteBuffer
public static final int
public static final int
public static final int
public static final Runtime
private int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private int
private IRubyObject
pack-priv static boolean
Inherited from org.jruby.RubyObject:
IVAR_INSPECTING_OBJECT_ALLOCATOROBJECT_ALLOCATORREIFYING_OBJECT_ALLOCATOR

Constructor Summary

AccessConstructor and Description
public
RubyIOBuffer(Ruby runtime, RubyClass metaClass)

public
RubyIOBuffer(Ruby runtime, RubyClass metaClass, ByteBuffer base, int size, int flags)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
private static void
bufferAnd(ByteBuffer output, ByteBuffer base, int size, ByteBuffer mask, int maskSize)

private static void
bufferAndInPlace(ByteBuffer a, int aSize, ByteBuffer b, int bSize)

private void
bufferCopy(ThreadContext context, int offset, ByteBuffer sourceBuffer, int sourceOffset, int sourceSize, int length)

private void
bufferCopy(ThreadContext context, int offset, ByteList sourceBuffer, int sourceOffset, int sourceSize, int length)

private static void
bufferNot(ByteBuffer output, ByteBuffer base, int size)

private static void
private static void
bufferOr(ByteBuffer output, ByteBuffer base, int size, ByteBuffer mask, int maskSize)

private static void
bufferOrInPlace(ByteBuffer a, int aSize, ByteBuffer b, int bSize)

private boolean
private static void
bufferXor(ByteBuffer output, ByteBuffer base, int size, ByteBuffer mask, int maskSize)

private static void
bufferXorInPlace(ByteBuffer a, int aSize, ByteBuffer b, int bSize)

private static RubyIOBuffer
private static RubyFile
private void
private static void
private void
public IRubyObject
public IRubyObject
public IRubyObject
clear(ThreadContext context, IRubyObject _value, IRubyObject _offset)

public IRubyObject
clear(ThreadContext context, IRubyObject _value, IRubyObject _offset, IRubyObject _length)

private IRubyObject
clear(ThreadContext context, int value, int offset, int length)

public IRubyObject
copy(ThreadContext context, IRubyObject source)

public IRubyObject
copy(ThreadContext context, IRubyObject source, IRubyObject _offset)

public IRubyObject
copy(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length)

public IRubyObject
copy(ThreadContext context, IRubyObject[] args)

public IRubyObject
copy(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length, IRubyObject _sourceOffset)

public IRubyObject
copy(ThreadContext context, RubyIOBuffer source, int offset, int length, int sourceOffset)

public IRubyObject
copy(ThreadContext context, RubyString source, int offset, int length, int sourceOffset)

public static RubyClass
private int
defaultLength(ThreadContext context, int offset)

public IRubyObject
each(ThreadContext context, IRubyObject _dataType, Block block)

public IRubyObject
each(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, Block block)

public IRubyObject
each(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count, Block block)

private IRubyObject
each(ThreadContext context, ByteBuffer buffer, RubyIOBuffer.DataType dataType, int offset, int count, Block block)

public IRubyObject
each_byte(ThreadContext context, Block block)

public IRubyObject
each_byte(ThreadContext context, IRubyObject _offset, Block block)

public IRubyObject
each_byte(ThreadContext context, IRubyObject _offset, IRubyObject _count, Block block)

private IRubyObject
eachByte(ThreadContext context, ByteBuffer buffer, int offset, int count, Block block)

public IRubyObject
public IRubyObject
private int
extractLength(ThreadContext context, IRubyObject _length, int offset)

private static int
private static int
private static int
flagsForSize(int size)

public IRubyObject
private boolean
public IRubyObject
public IRubyObject
public IRubyObject
get_string(ThreadContext context, IRubyObject _offset, IRubyObject _length)

public IRubyObject
get_string(ThreadContext context, IRubyObject _offset, IRubyObject _length, IRubyObject _encoding)

public IRubyObject
public IRubyObject
get_values(ThreadContext context, IRubyObject dataTypes, IRubyObject _offset)

private ByteBuffer
private ByteBuffer
private static RubyIOBuffer.DataType
private static int
private static int
private IRubyObject
getString(ThreadContext context, int offset, int length, Encoding encoding)

private static IRubyObject
getValue(ThreadContext context, ByteBuffer buffer, int size, RubyIOBuffer.DataType dataType, int offset)

public IRubyObject
private static RubyString
hexdump(ThreadContext context, RubyString string, int width, ByteBuffer base, int size, boolean first)

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
initialize(ThreadContext context, int size)

public void
initialize(ThreadContext context, byte[] baseBytes, int size, int flags, IRubyObject source)

public IRubyObject
initialize_copy(ThreadContext
the thread context
context
,
IRubyObject
the original
other
)

Overrides org.jruby.RubyBasicObject.initialize_copy.

Initializes this object as a copy of the original, that is the parameter to this object.

public IRubyObject
inspect(ThreadContext context)

Overrides org.jruby.RubyBasicObject.inspect.

Overrides default org.jruby.runtime.builtin.IRubyObject.inspect.

Returns a string containing a human-readable representation of obj.

public IRubyObject
private static void
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
public IRubyObject
public IRubyObject
locked(ThreadContext context, Block block)

public IRubyObject
public static IRubyObject
map(ThreadContext context, IRubyObject self, IRubyObject _file)

public static IRubyObject
map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size)

public static IRubyObject
map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset)

public static IRubyObject
map(ThreadContext context, IRubyObject self, IRubyObject[] args)

public static IRubyObject
map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset, IRubyObject _flags)

private static RubyIOBuffer
map(ThreadContext context, RubyFile file, int size, int offset, int flags)

public static IRubyObject
map(ThreadContext context, IRubyObject self, RubyFile _file, int _size, int _offset, int _flags)

private static void
mapFile(ThreadContext context, RubyIOBuffer buffer, ChannelFD descriptor, int size, int offset, int flags)

public IRubyObject
public static RubyIOBuffer
newBuffer(ThreadContext context, ByteBuffer base, int size, int flags)

public static RubyIOBuffer
newBuffer(Ruby runtime, ByteBuffer base, int size, int flags)

public static RubyIOBuffer
newBuffer(Ruby runtime, int size, int flags)

public static RubyIOBuffer
newBuffer(ThreadContext context, RubyString string, int flags)

private static ByteBuffer
newBufferBase(Ruby runtime, int size, int flags)

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
pread(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length)

public IRubyObject
pread(ThreadContext context, IRubyObject[] args)

public IRubyObject
pread(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset)

public IRubyObject
pread(ThreadContext context, RubyIO io, int from, int length, int offset)

private static IRubyObject
preadInternal(ThreadContext context, RubyIO io, ByteBuffer base, int from, int offset, int size)

Read from the given io into the given buffer base at the given offset, from location, and size limit.

public IRubyObject
public IRubyObject
public IRubyObject
pwrite(ThreadContext context, IRubyObject[] args)

public IRubyObject
pwrite(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset)

public IRubyObject
pwrite(ThreadContext context, RubyIO io, int from, int length, int offset)

private static IRubyObject
pwriteInternal(ThreadContext context, RubyIO io, ByteBuffer base, int from, int offset, int size)

public static IRubyObject
rbFor(ThreadContext context, IRubyObject self, IRubyObject _string, Block block)

public IRubyObject
public IRubyObject
read(ThreadContext context, IRubyObject io, IRubyObject _length)

public IRubyObject
read(ThreadContext context, IRubyObject io, IRubyObject _length, IRubyObject _offset)

public IRubyObject
read(ThreadContext context, IRubyObject io, int length, int offset)

private static byte
readByte(ThreadContext context, ByteBuffer buffer, int offset)

private static double
readDouble(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static float
readFloat(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static int
readInt(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static IRubyObject
readInternal(ThreadContext context, RubyIO io, ByteBuffer base, int offset, int size)

Read from the given io into the given buffer base at the given offset and size limit.

private static long
readLong(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

public IRubyObject
private static short
readShort(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static int
readUnsignedByte(ThreadContext context, ByteBuffer buffer, int offset)

private static long
readUnsignedInt(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static BigInteger
readUnsignedLong(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

private static int
readUnsignedShort(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order)

public IRubyObject
public void
resize(ThreadContext context, int size)

public IRubyObject
public IRubyObject
set_string(ThreadContext context, IRubyObject _string, IRubyObject _offset)

public IRubyObject
set_string(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length)

public IRubyObject
public IRubyObject
set_string(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length, IRubyObject _stringOffset)

public IRubyObject
set_value(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _value)

public IRubyObject
set_values(ThreadContext context, IRubyObject _dataTypes, IRubyObject _offset, IRubyObject _values)

private static void
setValue(ThreadContext context, ByteBuffer buffer, int size, RubyIOBuffer.DataType dataType, int offset, IRubyObject value)

public IRubyObject
public IRubyObject
public static IRubyObject
size_of(ThreadContext context, IRubyObject self, IRubyObject dataType)

public IRubyObject
public IRubyObject
slice(ThreadContext context, IRubyObject _offset)

public IRubyObject
slice(ThreadContext context, IRubyObject _offset, IRubyObject _length)

public IRubyObject
slice(ThreadContext context, int offset, int length)

public static IRubyObject
string(ThreadContext context, IRubyObject self, IRubyObject _length, Block block)

private static short
swap(short s)

private static long
swapAsDouble(long l)

private static long
swapAsFloat(long l)

private static long
swapAsInt(long l)

private static long
swapAsLong(long l)

private static long
swapAsShort(long l)

public RubyString
public IRubyObject
private boolean
public IRubyObject
private static double
private static long
public IRubyObject
private boolean
private void
validateRange(ThreadContext context, int offset, int length)

private boolean
validateSlice(IRubyObject source, ByteBuffer base, int size)

public IRubyObject
values(ThreadContext context, IRubyObject _dataType)

public IRubyObject
values(ThreadContext context, IRubyObject _dataType, IRubyObject _offset)

public IRubyObject
values(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count)

private RubyArray<T extends IRubyObject>
values(ThreadContext context, ByteBuffer buffer, RubyIOBuffer.DataType dataType, int offset, int count)

private static IRubyObject
wrap(ThreadContext context, long value)

private static IRubyObject
wrap(ThreadContext context, BigInteger value)

private static IRubyObject
wrap(ThreadContext context, double value)

public IRubyObject
public IRubyObject
public IRubyObject
write(ThreadContext context, IRubyObject io, IRubyObject length, IRubyObject offset)

public IRubyObject
write(ThreadContext context, IRubyObject io, int length, int offset)

private static void
writeByte(ThreadContext context, ByteBuffer buffer, int offset, byte value)

private static void
writeDouble(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, double value)

private static void
writeFloat(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, float value)

private static void
writeInt(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, int value)

private static IRubyObject
writeInternal(ThreadContext context, RubyIO io, ByteBuffer base, int offset, int size)

private static void
writeLong(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, long value)

private static void
writeShort(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, short value)

private static void
writeUnsignedByte(ThreadContext context, ByteBuffer buffer, int offset, int value)

private static void
writeUnsignedInt(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, long value)

private static void
writeUnsignedLong(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, long value)

private static void
writeUnsignedShort(ThreadContext context, ByteBuffer buffer, int offset, ByteOrder order, int value)

public IRubyObject
private void
Inherited from org.jruby.RubyObject:
attachToObjectSpacecallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitcallInitconvertToTypedigdig1dig2eqlInternalequalInternalequalsfinishObjectClassgetNativeClassIndexhashCodeinspectop_eqqputsspecificEvaltoRubyStringtoString