Package org.jruby
Class RubyIOBuffer
java.lang.Object
org.jruby.RubyBasicObject
org.jruby.RubyObject
org.jruby.RubyIOBuffer
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<IRubyObject>
,InstanceVariables
,InternalVariables
,IRubyObject
,CoreObjectType
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jruby.RubyObject
RubyObject.Data
Nested classes/interfaces inherited from class org.jruby.RubyBasicObject
RubyBasicObject.Finalizer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final jnr.ffi.Runtime
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.jruby.RubyObject
IVAR_INSPECTING_OBJECT_ALLOCATOR, OBJECT_ALLOCATOR, REIFYING_OBJECT_ALLOCATOR
Fields inherited from class org.jruby.RubyBasicObject
ALL_F, BASICOBJECT_ALLOCATOR, COMPARE_BY_IDENTITY_F, ERR_INSECURE_SET_INST_VAR, FALSE_F, FL_USHIFT, FROZEN_F, IS_OVERLAID_F, metaClass, NEVER, NIL_F, REFINED_MODULE_F, STAMP_OFFSET, TAINTED_F, UNDEF, USER0_F, USER1_F, USER2_F, USER3_F, USER4_F, USER5_F, USER6_F, USER7_F, USER8_F, USER9_F, USERA_F, VAR_TABLE_OFFSET, varTable, varTableStamp
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionRubyIOBuffer
(Ruby runtime, RubyClass metaClass) RubyIOBuffer
(Ruby runtime, RubyClass metaClass, ByteBuffer base, int size, int flags) -
Method Summary
Modifier and TypeMethodDescriptionand_bang
(ThreadContext context, IRubyObject _mask) clear
(ThreadContext context) clear
(ThreadContext context, IRubyObject value) clear
(ThreadContext context, IRubyObject _value, IRubyObject _offset) clear
(ThreadContext context, IRubyObject _value, IRubyObject _offset, IRubyObject _length) copy
(ThreadContext context, RubyIOBuffer source, int offset, int length, int sourceOffset) copy
(ThreadContext context, RubyString source, int offset, int length, int sourceOffset) copy
(ThreadContext context, IRubyObject source) copy
(ThreadContext context, IRubyObject[] args) copy
(ThreadContext context, IRubyObject source, IRubyObject _offset) copy
(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length) copy
(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length, IRubyObject _sourceOffset) static RubyClass
createIOBufferClass
(ThreadContext context, RubyClass Object, RubyModule Comparable, RubyClass IO) each
(ThreadContext context, IRubyObject _dataType, Block block) each
(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, Block block) each
(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count, Block block) each_byte
(ThreadContext context, Block block) each_byte
(ThreadContext context, IRubyObject _offset, Block block) each_byte
(ThreadContext context, IRubyObject _offset, IRubyObject _count, Block block) empty_p
(ThreadContext context) external_p
(ThreadContext context) free
(ThreadContext context) get_string
(ThreadContext context) get_string
(ThreadContext context, IRubyObject _offset) get_string
(ThreadContext context, IRubyObject _offset, IRubyObject _length) get_string
(ThreadContext context, IRubyObject _offset, IRubyObject _length, IRubyObject _encoding) get_value
(ThreadContext context, IRubyObject type, IRubyObject _offset) get_values
(ThreadContext context, IRubyObject dataTypes, IRubyObject _offset) hexdump
(ThreadContext context) initialize
(ThreadContext context) void
initialize
(ThreadContext context, byte[] baseBytes, int size, int flags, IRubyObject source) initialize
(ThreadContext context, int size) initialize
(ThreadContext context, IRubyObject size) initialize
(ThreadContext context, IRubyObject _size, IRubyObject flags) initialize_copy
(ThreadContext context, IRubyObject other) Initializes this object as a copy of the original, that is the parameter to this object.inspect
(ThreadContext context) Returns a string containing a human-readable representation of obj.internal_p
(ThreadContext context) lock
(ThreadContext context) locked
(ThreadContext context, Block block) locked_p
(ThreadContext context) static IRubyObject
map
(ThreadContext context, IRubyObject self, RubyFile _file, int _size, int _offset, int _flags) static IRubyObject
map
(ThreadContext context, IRubyObject self, IRubyObject _file) static IRubyObject
map
(ThreadContext context, IRubyObject self, IRubyObject[] args) static IRubyObject
map
(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size) static IRubyObject
map
(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset) static IRubyObject
map
(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset, IRubyObject _flags) mapped_p
(ThreadContext context) static RubyIOBuffer
static RubyIOBuffer
newBuffer
(Ruby runtime, ByteBuffer base, int size, int flags) static RubyIOBuffer
newBuffer
(ThreadContext context, ByteBuffer base, int size, int flags) static RubyIOBuffer
newBuffer
(ThreadContext context, RubyString string, int flags) not_bang
(ThreadContext context) null_p
(ThreadContext context) op_and
(ThreadContext context, IRubyObject _mask) op_cmp
(ThreadContext context, IRubyObject other) op_not
(ThreadContext context) op_or
(ThreadContext context, IRubyObject _mask) op_xor
(ThreadContext context, IRubyObject _mask) or_bang
(ThreadContext context, IRubyObject _mask) pread
(ThreadContext context, RubyIO io, int from, int length, int offset) pread
(ThreadContext context, IRubyObject[] args) pread
(ThreadContext context, IRubyObject io, IRubyObject _from) pread
(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length) pread
(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset) pwrite
(ThreadContext context, RubyIO io, int from, int length, int offset) pwrite
(ThreadContext context, IRubyObject[] args) pwrite
(ThreadContext context, IRubyObject io, IRubyObject _from) pwrite
(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length) pwrite
(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset) static IRubyObject
rbFor
(ThreadContext context, IRubyObject self, IRubyObject _string, Block block) read
(ThreadContext context, IRubyObject io) read
(ThreadContext context, IRubyObject io, int length, int offset) read
(ThreadContext context, IRubyObject io, IRubyObject _length) read
(ThreadContext context, IRubyObject io, IRubyObject _length, IRubyObject _offset) readonly_p
(ThreadContext context) void
resize
(ThreadContext context, int size) resize
(ThreadContext context, IRubyObject size) set_string
(ThreadContext context, IRubyObject _string) set_string
(ThreadContext context, IRubyObject[] args) set_string
(ThreadContext context, IRubyObject _string, IRubyObject _offset) set_string
(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length) set_string
(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length, IRubyObject _stringOffset) set_value
(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _value) set_values
(ThreadContext context, IRubyObject _dataTypes, IRubyObject _offset, IRubyObject _values) shared_p
(ThreadContext context) size
(ThreadContext context) static IRubyObject
size_of
(ThreadContext context, IRubyObject self, IRubyObject dataType) slice
(ThreadContext context) slice
(ThreadContext context, int offset, int length) slice
(ThreadContext context, IRubyObject _offset) slice
(ThreadContext context, IRubyObject _offset, IRubyObject _length) static IRubyObject
string
(ThreadContext context, IRubyObject self, IRubyObject _length, Block block) to_s
(ThreadContext context) transfer
(ThreadContext context) unlock
(ThreadContext context) valid_p
(ThreadContext context) values
(ThreadContext context, IRubyObject _dataType) values
(ThreadContext context, IRubyObject _dataType, IRubyObject _offset) values
(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count) write
(ThreadContext context, IRubyObject io) write
(ThreadContext context, IRubyObject io, int length, int offset) write
(ThreadContext context, IRubyObject io, IRubyObject length) write
(ThreadContext context, IRubyObject io, IRubyObject length, IRubyObject offset) xor_bang
(ThreadContext context, IRubyObject _mask) Methods inherited from class org.jruby.RubyObject
attachToObjectSpace, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, callInit, convertToType, dig, dig1, dig2, eqlInternal, equalInternal, equals, finishObjectClass, getNativeClassIndex, hashCode, inspect, op_eqq, puts, specificEval, toRubyString, toString
Methods inherited from class org.jruby.RubyBasicObject
addFinalizer, addFinalizer, anyToString, asJavaString, asString, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, checkArrayType, checkCallMethod, checkCallMethod, checkFrozen, checkStringType, cloneSetup, compareTo, convertToArray, convertToFloat, convertToHash, convertToInteger, convertToInteger, convertToInteger, convertToString, copyInstanceVariablesInto, copySpecialInstanceVariables, dataGetStruct, dataGetStructChecked, dataWrapStruct, decode, display, dup, dupFinalizer, dupSetup, ensureInstanceVariablesSettable, eql, eql_p, eql_p, equal_p, evalUnder, extend, fastGetInstanceVariable, fastGetInternalVariable, fastHasInstanceVariable, fastHasInternalVariable, fastSetInstanceVariable, fastSetInternalVariable, finishBasicObjectClass, forEachInstanceVariable, forEachInstanceVariableName, freeze, frozen_p, getCurrentContext, getFFIHandle, getFlag, getInstanceEvalClass, getInstanceEvalClass, getInstanceVariable, getInstanceVariableList, getInstanceVariableNameList, getInstanceVariables, getInternalVariable, getInternalVariables, getJavaClass, getMarshalVariableList, getMetaClass, getMetaClass, getNativeHandle, getNativeTypeIndex, getObjectId, getRuntime, getSingletonClass, getSingletonClassClone, getSingletonClassCloneAndAttach, getSingletonClassCloneAndAttach, getType, getVariable, getVariableCount, getVariableList, getVariableNameList, hash, hash, hashyInspect, hasInstanceVariable, hasInstanceVariables, hasInternalVariable, hasVariables, id, infectBy, initialize_copy, inspect, inspectHashCode, instance_eval, instance_eval, instance_eval, instance_eval, instance_eval, instance_exec, instance_of_p, instance_variable_defined_p, instance_variable_get, instance_variable_set, instance_variables, isBuiltin, isClass, isFalse, isFrozen, isImmediate, isModule, isNil, isSpecialConst, isSpecialObject, isTaint, isTrue, isUntrusted, kind_of_p, makeMetaClass, makeMetaClass, makeMetaClassBootstrap, method, method, method, method_missing, methods, methods, nil_p, nonFixnumHashCode, nonFixnumHashCode, OBJ_INIT_COPY, objInitCopy, op_equal, op_match, op_not_equal, op_not_match, private_methods, protected_methods, public_methods, rbClone, rbClone, rbInspect, remove_instance_variable, removeFinalizers, removeInstanceVariable, removeInternalVariable, respond_to_p, respond_to_p, respondsTo, respondsToMissing, respondsToMissing, send, send, send, send, send, setFFIHandle, setFlag, setFrozen, setInstanceVariable, setInternalVariable, setMetaClass, setNativeHandle, setTaint, setUntrusted, setVariable, singleton_method, singleton_method, singleton_method_added, singleton_method_removed, singleton_method_undefined, singleton_methods, singletonClass, specificEval, specificEval, specificEval, specificEval, syncVariables, syncVariables, taint, taint, tainted_p, testFrozen, testFrozen, to_a, to_a, to_s, toJava, trust, type, untaint, untrust, untrusted_p, validateInstanceVariable, validateInstanceVariable, validateInstanceVariable, variableTableContains, variableTableFastContains, variableTableFastFetch, variableTableFastStore, variableTableFetch, variableTableRemove, variableTableStore, variableTableSync, yieldUnder, yieldUnder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jruby.runtime.builtin.IRubyObject
checkStringType19, dup, marshalLiveVariables
-
Field Details
-
FFI_RUNTIME
public static final jnr.ffi.Runtime FFI_RUNTIME -
PAGE_SIZE
public static final int PAGE_SIZE- See Also:
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE- See Also:
-
EXTERNAL
public static final int EXTERNAL- See Also:
-
INTERNAL
public static final int INTERNAL- See Also:
-
MAPPED
public static final int MAPPED- See Also:
-
SHARED
public static final int SHARED- See Also:
-
LOCKED
public static final int LOCKED- See Also:
-
PRIVATE
public static final int PRIVATE- See Also:
-
READONLY
public static final int READONLY- See Also:
-
LITTLE_ENDIAN
public static final int LITTLE_ENDIAN- See Also:
-
BIG_ENDIAN
public static final int BIG_ENDIAN- See Also:
-
HOST_ENDIAN
public static final int HOST_ENDIAN -
NETWORK_ENDIAN
public static final int NETWORK_ENDIAN- See Also:
-
-
Constructor Details
-
RubyIOBuffer
-
RubyIOBuffer
-
-
Method Details
-
createIOBufferClass
public static RubyClass createIOBufferClass(ThreadContext context, RubyClass Object, RubyModule Comparable, RubyClass IO) -
newBuffer
-
newBuffer
-
newBuffer
-
newBuffer
-
rbFor
public static IRubyObject rbFor(ThreadContext context, IRubyObject self, IRubyObject _string, Block block) -
string
public static IRubyObject string(ThreadContext context, IRubyObject self, IRubyObject _length, Block block) -
map
-
map
public static IRubyObject map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size) -
map
public static IRubyObject map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset) -
map
-
map
public static IRubyObject map(ThreadContext context, IRubyObject self, IRubyObject _file, IRubyObject _size, IRubyObject _offset, IRubyObject _flags) -
map
public static IRubyObject map(ThreadContext context, IRubyObject self, RubyFile _file, int _size, int _offset, int _flags) -
initialize
- Overrides:
initialize
in classRubyBasicObject
-
initialize
-
initialize
-
initialize
-
initialize
public void initialize(ThreadContext context, byte[] baseBytes, int size, int flags, IRubyObject source) -
initialize_copy
Description copied from class:RubyBasicObject
Initializes this object as a copy of the original, that is the parameter to this object. Will make sure that the argument actually has the same real class as this object. It shouldn't be possible to initialize an object with something totally different.- Overrides:
initialize_copy
in classRubyBasicObject
- Parameters:
context
- the thread contextother
- the original- Returns:
- a copy unless the same thing
-
inspect
Description copied from class:RubyBasicObject
Returns a string containing a human-readable representation of obj. If not overridden, uses theto_s
method to generate the string. [ 1, 2, 3..4, 'five' ].inspect #=> "[1, 2, 3..4, \"five\"]" Time.new.inspect #=> "Wed Apr 09 08:54:39 CDT 2003"- Specified by:
inspect
in interfaceIRubyObject
- Overrides:
inspect
in classRubyBasicObject
-
hexdump
-
to_s
- Overrides:
to_s
in classRubyBasicObject
-
size
-
valid_p
-
transfer
-
null_p
-
empty_p
-
external_p
-
internal_p
-
mapped_p
-
locked_p
-
readonly_p
-
locked
-
lock
-
unlock
-
slice
-
slice
-
slice
-
slice
-
op_cmp
- Overrides:
op_cmp
in classRubyBasicObject
-
resize
-
resize
-
clear
-
clear
-
clear
-
clear
public IRubyObject clear(ThreadContext context, IRubyObject _value, IRubyObject _offset, IRubyObject _length) -
free
-
size_of
-
get_value
-
get_values
-
each
-
each
public IRubyObject each(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, Block block) -
each
public IRubyObject each(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count, Block block) -
values
-
values
-
values
public IRubyObject values(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _count) -
each_byte
-
each_byte
-
each_byte
public IRubyObject each_byte(ThreadContext context, IRubyObject _offset, IRubyObject _count, Block block) -
set_value
public IRubyObject set_value(ThreadContext context, IRubyObject _dataType, IRubyObject _offset, IRubyObject _value) -
set_values
public IRubyObject set_values(ThreadContext context, IRubyObject _dataTypes, IRubyObject _offset, IRubyObject _values) -
copy
-
copy
-
copy
public IRubyObject copy(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length) -
copy
-
copy
public IRubyObject copy(ThreadContext context, IRubyObject source, IRubyObject _offset, IRubyObject _length, IRubyObject _sourceOffset) -
copy
public IRubyObject copy(ThreadContext context, RubyIOBuffer source, int offset, int length, int sourceOffset) -
copy
public IRubyObject copy(ThreadContext context, RubyString source, int offset, int length, int sourceOffset) -
get_string
-
get_string
-
get_string
-
get_string
public IRubyObject get_string(ThreadContext context, IRubyObject _offset, IRubyObject _length, IRubyObject _encoding) -
set_string
-
set_string
-
set_string
public IRubyObject set_string(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length) -
set_string
-
set_string
public IRubyObject set_string(ThreadContext context, IRubyObject _string, IRubyObject _offset, IRubyObject _length, IRubyObject _stringOffset) -
op_and
-
op_or
-
op_xor
-
op_not
- Overrides:
op_not
in classRubyBasicObject
-
and_bang
-
or_bang
-
xor_bang
-
not_bang
-
read
-
read
-
read
public IRubyObject read(ThreadContext context, IRubyObject io, IRubyObject _length, IRubyObject _offset) -
read
-
pread
-
pread
public IRubyObject pread(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length) -
pread
-
pread
public IRubyObject pread(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset) -
pread
-
write
-
write
-
write
public IRubyObject write(ThreadContext context, IRubyObject io, IRubyObject length, IRubyObject offset) -
write
-
pwrite
-
pwrite
public IRubyObject pwrite(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length) -
pwrite
-
pwrite
public IRubyObject pwrite(ThreadContext context, IRubyObject io, IRubyObject _from, IRubyObject _length, IRubyObject _offset) -
pwrite
-