Package org.jruby.runtime.marshal
Class UnmarshalStream
java.lang.Object
java.io.InputStream
org.jruby.runtime.marshal.UnmarshalStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Unmarshals objects from strings or streams in Ruby's marshal format.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UnmarshalCacheprivate final InputStreamprivate final IRubyObjectprotected final Rubyprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionUnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint) UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint, boolean untrust) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprivate IRubyObjectvoiddefaultVariablesUnmarshal(IRubyObject object) private IRubyObjectdoCallProcForLink(IRubyObject result, int type) private IRubyObjectdoCallProcForObj(IRubyObject result) private RubyClassstatic RubyClassgetClassFromPath(Ruby runtime, String path) org.jcodings.Encodingstatic RubyModulegetModuleFromPath(Ruby runtime, String path) intread()byteintvoidregisterLinkTarget(IRubyObject newObject) private IRubyObjectintunmarshalObject(boolean callProc) private IRubyObjectprivate IRubyObjectunmarshalObject(UnmarshalStream.MarshalState state, boolean callProc) private IRubyObjectunmarshalObjectDirectly(int type, UnmarshalStream.MarshalState state, boolean callProc) private IRubyObjectprivate IRubyObjectprivate IRubyObjectMethods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
runtime
-
cache
-
proc
-
inputStream
-
taint
private final boolean taint
-
-
Constructor Details
-
UnmarshalStream
public UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint) throws IOException - Throws:
IOException
-
UnmarshalStream
@Deprecated public UnmarshalStream(Ruby runtime, InputStream in, IRubyObject proc, boolean taint, boolean untrust) throws IOException Deprecated.- Throws:
IOException
-
-
Method Details
-
unmarshalObject
- Throws:
IOException
-
unmarshalObject
- Throws:
IOException
-
unmarshalObject
- Throws:
IOException
-
unmarshalObject
private IRubyObject unmarshalObject(UnmarshalStream.MarshalState state, boolean callProc) throws IOException - Throws:
IOException
-
registerLinkTarget
-
getModuleFromPath
-
getClassFromPath
-
doCallProcForLink
-
doCallProcForObj
-
unmarshalObjectDirectly
private IRubyObject unmarshalObjectDirectly(int type, UnmarshalStream.MarshalState state, boolean callProc) throws IOException - Throws:
IOException
-
unmarshalRegexp
- Throws:
IOException
-
getRuntime
-
readUnsignedByte
- Throws:
IOException
-
readSignedByte
- Throws:
IOException
-
unmarshalString
- Throws:
IOException
-
unmarshalInt
- Throws:
IOException
-
defaultObjectUnmarshal
- Throws:
IOException
-
defaultVariablesUnmarshal
- Throws:
IOException
-
getEncodingFromUnmarshaled
- Throws:
IOException
-
uclassUnmarshall
- Throws:
IOException
-
userUnmarshal
- Throws:
IOException
-
userNewUnmarshal
- Throws:
IOException
-
findClass
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-