Top Description Inners Fields Constructors Methods
org.jruby.runtime.marshal

public Class UnmarshalStream

extends InputStream
Class Inheritance
Annotations
@Deprecated
since:10.0
forRemoval:true
@SuppressWarnings:removal
Imports
java.io.EOFException, .IOException, .InputStream, java.util.ArrayList, .Collections, .List, org.jcodings.Encoding, .EncodingDB.Entry, org.jcodings.specific.ASCIIEncoding, .USASCIIEncoding, .UTF8Encoding, org.jruby.Ruby, .RubyArray, .RubyBignum, .RubyClass, .RubyEncoding, .RubyFixnum, .RubyFloat, .RubyHash, .RubyModule, .RubyObject, .RubyRegexp, .RubyString, .RubyStruct, .RubySymbol, org.jruby.runtime.Helpers, .Constants, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.encoding.EncodingCapable, org.jruby.util.ByteList, .RegexpOptions, .StringSupport

Deprecated

for removal since 10.0.

Unmarshals objects from strings or streams in Ruby's marshal format.
Author
Anders

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final UnmarshalCache
cache

References Deprecated UnmarshalCache is deprecated or references (maybe indirectly) at least one deprecated element.
private final boolean
private final InputStream
private IRubyObject
protected final Ruby

Constructor Summary

AccessConstructor and Description
public
public
UnmarshalStream(Ruby runtime, InputStream in, boolean freeze, IRubyObject proc)

public
UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint, boolean untrust)
Deprecated

public
UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint)
Deprecated

Method Summary

Modifier and TypeMethod and Description
private void
public void
private IRubyObject
public IRubyObject
private IRubyObject
public static RubyClass
getClassFromPath(Ruby runtime, String path)

public static RubyModule
getModuleFromPath(Ruby runtime, String path)

public Ruby
public void
ivar(UnmarshalStream.MarshalState state, IRubyObject object, boolean[] hasEncoding)

private IRubyObject
leave(ThreadContext context, IRubyObject value, boolean partial)

private RubyModule
private IRubyObject
object0(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectFor(ThreadContext context, int type, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectForArray(ThreadContext context, boolean partial)

private IRubyObject
private IRubyObject
objectForClass(ThreadContext context, boolean partial)

private IRubyObject
objectForData(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectForExtended(ThreadContext context, List<RubyModule> extendedModules)

private IRubyObject
private IRubyObject
private IRubyObject
private IRubyObject
objectForHash(ThreadContext context, boolean partial)

private IRubyObject
objectForHashDefault(ThreadContext context, boolean partial)

private IRubyObject
objectForIVar(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
objectForModule(ThreadContext context, boolean partial)

private IRubyObject
private IRubyObject
private IRubyObject
objectForObject(ThreadContext context, boolean partial)

private IRubyObject
objectForRegexp(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial)

private IRubyObject
objectForString(ThreadContext context, boolean partial)

private IRubyObject
objectForStruct(ThreadContext context, boolean partial)

private IRubyObject
objectForSymbol(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial)

private IRubyObject
private IRubyObject
objectForUClass(ThreadContext context, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
private IRubyObject
objectForUsrMarshal(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules)

private IRubyObject
public void
private int
public int
read()

Implements abstract java.io.InputStream.read.

Reads the next byte of data from the input stream.

public byte
public int
public RubySymbol
public Encoding
private RubySymbol
public RubySymbol
public int
public IRubyObject
public IRubyObject
unmarshalObject(boolean _callProc)
Deprecated

private IRubyObject
public ByteList
private IRubyObject
Inherited from java.io.InputStream:
availableclosemarkmarkSupportednullInputStreamreadreadreadAllBytesreadNBytesreadNBytesresetskipskipNBytestransferTo

Field Detail

cacheback to summary
private final UnmarshalCache cache

References Deprecated

UnmarshalCache is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

freezeback to summary
private final boolean freeze
inputStreamback to summary
private final InputStream inputStream
procback to summary
private IRubyObject proc
runtimeback to summary
protected final Ruby runtime

Constructor Detail

UnmarshalStreamback to summary
public UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc) throws IOException
UnmarshalStreamback to summary
public UnmarshalStream(Ruby runtime, InputStream in, boolean freeze, IRubyObject proc) throws IOException
UnmarshalStreamback to summary
public UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint, boolean untrust) throws IOException

Deprecated

Annotations
@Deprecated
UnmarshalStreamback to summary
public UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint) throws IOException

Deprecated

Annotations
@Deprecated

Method Detail

appendExtendedModulesback to summary
private void appendExtendedModules(ThreadContext context, IRubyObject obj, List<RubyModule> extendedModules)
defaultVariablesUnmarshalback to summary
public void defaultVariablesUnmarshal(UnmarshalStream.MarshalState state, IRubyObject object) throws IOException

Deprecated

Annotations
@Deprecated
doCallProcForObjback to summary
private IRubyObject doCallProcForObj(IRubyObject result)
entryback to summary
public IRubyObject entry(IRubyObject value)
fixupCompatback to summary
private IRubyObject fixupCompat(IRubyObject obj)
getClassFromPathback to summary
public static RubyClass getClassFromPath(Ruby runtime, String path)
getModuleFromPathback to summary
public static RubyModule getModuleFromPath(Ruby runtime, String path)
getRuntimeback to summary
public Ruby getRuntime()
ivarback to summary
public void ivar(UnmarshalStream.MarshalState state, IRubyObject object, boolean[] hasEncoding) throws IOException
leaveback to summary
private IRubyObject leave(ThreadContext context, IRubyObject value, boolean partial)
mustBeModuleback to summary
private RubyModule mustBeModule(ThreadContext context, IRubyObject value, IRubyObject path)
object0back to summary
private IRubyObject object0(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules) throws IOException
objectForback to summary
private IRubyObject objectFor(ThreadContext context, int type, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules) throws IOException
objectForArrayback to summary
private IRubyObject objectForArray(ThreadContext context, boolean partial) throws IOException
objectForBignumback to summary
private IRubyObject objectForBignum(ThreadContext context) throws IOException
objectForClassback to summary
private IRubyObject objectForClass(ThreadContext context, boolean partial) throws IOException
objectForDataback to summary
private IRubyObject objectForData(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules) throws IOException
objectForExtendedback to summary
private IRubyObject objectForExtended(ThreadContext context, List<RubyModule> extendedModules) throws IOException
objectForFalseback to summary
private IRubyObject objectForFalse(ThreadContext context)
objectForFixnumback to summary
private IRubyObject objectForFixnum(ThreadContext context) throws IOException
objectForFloatback to summary
private IRubyObject objectForFloat(ThreadContext context) throws IOException
objectForHashback to summary
private IRubyObject objectForHash(ThreadContext context, boolean partial) throws IOException
objectForHashDefaultback to summary
private IRubyObject objectForHashDefault(ThreadContext context, boolean partial) throws IOException
objectForIVarback to summary
private IRubyObject objectForIVar(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules) throws IOException
objectForModuleback to summary
private IRubyObject objectForModule(ThreadContext context, boolean partial) throws IOException
objectForModuleOldback to summary
private IRubyObject objectForModuleOld(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial) throws IOException
objectForNilback to summary
private IRubyObject objectForNil(ThreadContext context)
objectForObjectback to summary
private IRubyObject objectForObject(ThreadContext context, boolean partial) throws IOException
objectForRegexpback to summary
private IRubyObject objectForRegexp(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial) throws IOException
objectForStringback to summary
private IRubyObject objectForString(ThreadContext context, boolean partial) throws IOException
objectForStructback to summary
private IRubyObject objectForStruct(ThreadContext context, boolean partial) throws IOException
objectForSymbolback to summary
private IRubyObject objectForSymbol(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial) throws IOException
objectForTrueback to summary
private IRubyObject objectForTrue(ThreadContext context)
objectForUClassback to summary
private IRubyObject objectForUClass(ThreadContext context, boolean partial, List<RubyModule> extendedModules) throws IOException
objectForUserDefback to summary
private IRubyObject objectForUserDef(UnmarshalStream.MarshalState state, boolean partial) throws IOException
objectForUsrMarshalback to summary
private IRubyObject objectForUsrMarshal(ThreadContext context, UnmarshalStream.MarshalState state, boolean partial, List<RubyModule> extendedModules) throws IOException
postProcback to summary
private IRubyObject postProc(IRubyObject value)
prohibitIVarback to summary
public void prohibitIVar(UnmarshalStream.MarshalState state, String label, String name)
r_byteback to summary
private int r_byte() throws IOException
readback to summary
public int read() throws IOException

Implements abstract java.io.InputStream.read.

Doc from java.io.InputStream.read.

Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

Returns:int

the next byte of data, or -1 if the end of the stream is reached.

Exceptions
IOException:
if an I/O error occurs.
readSignedByteback to summary
public byte readSignedByte() throws IOException
readUnsignedByteback to summary
public int readUnsignedByte() throws IOException
symbolback to summary
public RubySymbol symbol() throws IOException
symbolToEncodingback to summary
public Encoding symbolToEncoding(RubySymbol symbol, IRubyObject value)
symrealback to summary
private RubySymbol symreal(UnmarshalStream.MarshalState state) throws IOException
uniqueback to summary
public RubySymbol unique() throws IOException
unmarshalIntback to summary
public int unmarshalInt() throws IOException
unmarshalObjectback to summary
public IRubyObject unmarshalObject() throws IOException
unmarshalObjectback to summary
public IRubyObject unmarshalObject(boolean _callProc) throws IOException

Deprecated

Annotations
@Deprecated
unmarshalRegexpback to summary
private IRubyObject unmarshalRegexp(UnmarshalStream.MarshalState state) throws IOException
unmarshalStringback to summary
public ByteList unmarshalString() throws IOException
userUnmarshalback to summary
private IRubyObject userUnmarshal(UnmarshalStream.MarshalState state) throws IOException
org.jruby.runtime.marshal back to summary

public Class UnmarshalStream.MarshalState

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
MarshalState(boolean ivarWaiting)

Method Summary

Modifier and TypeMethod and Description
public boolean
public void
setIvarWaiting(boolean ivarWaiting)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ivarWaitingback to summary
private boolean ivarWaiting

Constructor Detail

MarshalStateback to summary
pack-priv MarshalState(boolean ivarWaiting)

Method Detail

isIvarWaitingback to summary
public boolean isIvarWaiting()
setIvarWaitingback to summary
public void setIvarWaiting(boolean ivarWaiting)