org.jruby.runtime.marshal
Class MarshalStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.jruby.runtime.marshal.MarshalStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class MarshalStream
- extends java.io.FilterOutputStream
Marshals objects into Ruby's binary marshal format.
- Author:
- Anders
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary |
MarshalStream(Ruby runtime,
java.io.OutputStream out,
int depthLimit)
|
Methods inherited from class java.io.FilterOutputStream |
close, flush, write, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarshalStream
public MarshalStream(Ruby runtime,
java.io.OutputStream out,
int depthLimit)
throws java.io.IOException
- Throws:
java.io.IOException
dumpObject
public void dumpObject(IRubyObject value)
throws java.io.IOException
- Throws:
java.io.IOException
registerLinkTarget
public void registerLinkTarget(IRubyObject newObject)
getPathFromClass
public static java.lang.String getPathFromClass(RubyModule clazz)
writeUserClass
public void writeUserClass(IRubyObject obj,
RubyClass type)
throws java.io.IOException
- Throws:
java.io.IOException
dumpInstanceVars
public void dumpInstanceVars(java.util.Map instanceVars)
throws java.io.IOException
- Deprecated. superseded by
#dumpVariables()
- Throws:
java.io.IOException
dumpVariables
public void dumpVariables(java.util.List<Variable<java.lang.Object>> vars)
throws java.io.IOException
- Throws:
java.io.IOException
dumpDefaultObjectHeader
public void dumpDefaultObjectHeader(RubyClass type)
throws java.io.IOException
- Throws:
java.io.IOException
dumpDefaultObjectHeader
public void dumpDefaultObjectHeader(char tp,
RubyClass type)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
writeString
public void writeString(org.jruby.util.ByteList value)
throws java.io.IOException
- Throws:
java.io.IOException
dumpSymbol
public void dumpSymbol(java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
writeInt
public void writeInt(int value)
throws java.io.IOException
- Throws:
java.io.IOException
writeByte
public void writeByte(int value)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2002-2009 JRuby Team. All Rights Reserved.