org.oreodata.standalone
Class FlatRecordOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.DataOutputStream
                    |
                    +--org.oreodata.standalone.FlatRecordOutputStream
All Implemented Interfaces:
java.io.DataOutput, java.io.ObjectOutput

public class FlatRecordOutputStream
extends java.io.DataOutputStream
implements java.io.ObjectOutput

An implementation of ObjectOutput for spitting out Oreo records onto a stream in a key=value flat-file format.

Author:
Jonathan Revusky
See Also:
for more info on the stream format.

Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
FlatRecordOutputStream(java.io.OutputStream os)
           
FlatRecordOutputStream(java.lang.String filename)
          A convenience constructor that takes a filename argument.
 
Method Summary
 void writeObject(java.lang.Object o)
          Serialise object in ASCII format xx=yyy
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectOutput
close, flush, write, write, write
 
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Constructor Detail

FlatRecordOutputStream

public FlatRecordOutputStream(java.io.OutputStream os)
Parameters:
os - the underlying outputstream to write to.

FlatRecordOutputStream

public FlatRecordOutputStream(java.lang.String filename)
                       throws java.io.IOException
A convenience constructor that takes a filename argument.

Parameters:
filename - where to squirt the serialised stream.
Method Detail

writeObject

public void writeObject(java.lang.Object o)
                 throws java.io.IOException
Serialise object in ASCII format xx=yyy

Specified by:
writeObject in interface java.io.ObjectOutput
Parameters:
o - Record to write
java.io.IOException