org.jruby.runtime.marshal
Class UnmarshalStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.BufferedInputStream
              extended by org.jruby.runtime.marshal.UnmarshalStream
All Implemented Interfaces:
java.io.Closeable

public class UnmarshalStream
extends java.io.BufferedInputStream

Unmarshals objects from strings or streams in Ruby's marsal format.

Author:
Anders

Field Summary
protected  Ruby runtime
           
 
Fields inherited from class java.io.BufferedInputStream
buf, count, marklimit, markpos, pos
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
UnmarshalStream(Ruby runtime, java.io.InputStream in, IRubyObject proc)
           
 
Method Summary
 void defaultVariablesUnmarshal(IRubyObject object)
           
static RubyClass getClassFromPath(Ruby runtime, java.lang.String path)
           
static RubyModule getModuleFromPath(Ruby runtime, java.lang.String path)
           
 Ruby getRuntime()
           
 byte readSignedByte()
           
 int readUnsignedByte()
           
 void registerLinkTarget(IRubyObject newObject)
           
 int unmarshalInt()
           
 IRubyObject unmarshalObject()
           
 ByteList unmarshalString()
           
 
Methods inherited from class java.io.BufferedInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.io.FilterInputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runtime

protected final Ruby runtime
Constructor Detail

UnmarshalStream

public UnmarshalStream(Ruby runtime,
                       java.io.InputStream in,
                       IRubyObject proc)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

unmarshalObject

public IRubyObject unmarshalObject()
                            throws java.io.IOException
Throws:
java.io.IOException

registerLinkTarget

public void registerLinkTarget(IRubyObject newObject)

getModuleFromPath

public static RubyModule getModuleFromPath(Ruby runtime,
                                           java.lang.String path)

getClassFromPath

public static RubyClass getClassFromPath(Ruby runtime,
                                         java.lang.String path)

getRuntime

public Ruby getRuntime()

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Throws:
java.io.IOException

readSignedByte

public byte readSignedByte()
                    throws java.io.IOException
Throws:
java.io.IOException

unmarshalString

public ByteList unmarshalString()
                         throws java.io.IOException
Throws:
java.io.IOException

unmarshalInt

public int unmarshalInt()
                 throws java.io.IOException
Throws:
java.io.IOException

defaultVariablesUnmarshal

public void defaultVariablesUnmarshal(IRubyObject object)
                               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2002-2007 JRuby Team. All Rights Reserved.