JACK 5.4 JACOB Application Interface

aos.apib
Class OutStream

java.lang.Object
  extended byaos.apib.BaseStream
      extended byaos.apib.OutStream
Direct Known Subclasses:
AsciiOutStream, BinaryOutStream, GetStream, JDBCOutStream

public abstract class OutStream
extends aos.apib.BaseStream

OutStream is a base class for JACOB output writing/filtering. These environment properties are recognized: "JACOB.OutputType" can be set to "ascii", "binary" or "xml". "JACOB.WarnNonJACOB=true" will warn when non-JACOB objects are embedded within a JACOB object.

See Also:
Serialized Form

Constructor Summary
OutStream()
          Constructs an OutStream.
 
Method Summary
 void addNonApib(java.lang.Object o)
           
 void close()
          Closes the sink
 boolean hasBeenSeen(java.lang.Object o)
           
 void initSeen()
           
static OutStream newAsciiOutStream(MemoryBuffer mb)
           
static OutStream newAsciiOutStream(java.io.OutputStream fd)
           
static OutStream newBinaryOutStream(MemoryBuffer mb)
           
static OutStream newBinaryOutStream(java.io.OutputStream fd)
           
static OutStream newOutStream(MemoryBuffer mb)
           
static OutStream newOutStream(java.io.OutputStream fd)
           
 Base notifyWriteReplacer(Base obj, boolean written)
           
static OutStream open(java.lang.String filename)
          Creates an appropriate OutStream for a given sink specifier.
 void prelude()
          To be overriden: this should print anything that needs to go at the front of the stream.
abstract  void putAggregate(Aggregate v, int n, Aggregate d, StreamerSupport s)
           
abstract  void putAggregate(Base[] v, int n, Base[] d, StreamerSupport s)
           
abstract  void putBool(boolean v, int n, boolean d, StreamerSupport s)
           
abstract  void putByte(byte v, int n, byte d, StreamerSupport s)
           
abstract  void putChar(char v, int n, char d, StreamerSupport s)
           
abstract  void putData(byte[] v, int n, byte[] d, StreamerSupport s)
           
abstract  void putDouble(double v, int n, double d, StreamerSupport s)
           
abstract  void putEnum(int v, int n, int d, StreamerSupport s, aos.apib.EnumInfo i)
           
 void putFilename(java.lang.String v, int n, java.lang.String d, StreamerSupport s)
           
abstract  void putFloat(float v, int n, float d, StreamerSupport s)
           
abstract  void putInt(int v, int n, int d, StreamerSupport s)
           
abstract  void putLong(long v, int n, long d, StreamerSupport s)
           
abstract  void putObject(Base v, int n, Base d, StreamerSupport s)
           
abstract  void putOther(java.lang.Object v, int n, java.lang.Object d, StreamerSupport s)
           
abstract  void putShort(short v, int n, short d, StreamerSupport s)
           
abstract  void putString(java.lang.String v, int n, java.lang.String d, StreamerSupport s)
           
abstract  void reset(MemoryBuffer mb)
           
 boolean seenMultiple(java.lang.Object o)
           
static byte[] toGZIP(Base o)
           
 void trailer()
          To be overriden: this should print anything that needs to go at the end of the stream.
abstract  void writeBaseClasses(Base o, int basen, StreamerSupport s)
           
 void writeBaseClasses(Base o, StreamerSupport s)
           
 void writeMultipleObjects(BaseList list)
           
abstract  void writeObject(Base o)
           
static java.lang.String writeObject(java.lang.Object o)
           
static void writeObject(java.io.PrintStream out, java.lang.Object o)
           
static void writeObject(java.lang.StringBuffer b, java.lang.Object o)
          Writes a JACOB Object tree.
static void writeSimplifiedObject(java.lang.StringBuffer b, java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutStream

public OutStream()
Constructs an OutStream. This constructor can only be used by OutStream extensions that handle specific sink types.

Method Detail

prelude

public void prelude()
To be overriden: this should print anything that needs to go at the front of the stream. NOTE: it is the responsibility of any derived class to call prelude() in their constructor if they require this functionality.


trailer

public void trailer()
To be overriden: this should print anything that needs to go at the end of the stream. Note: this is automatically called when the stream is closed.


close

public void close()
Closes the sink


open

public static OutStream open(java.lang.String filename)
Creates an appropriate OutStream for a given sink specifier. The appropriate kind of OutStream is determined by interpreting the sink specifier. Currently three kinds of sinks are supported:
Binary transport file
If the specifier has the form "apib:binary:".
Textual transport file
If the specifier has the form "apib:ascii:".
SQL transport through JDBC
If the specifier has the form "jdbc:xxx" where xxx is a JDBCOutStream specification.


writeObject

public static void writeObject(java.lang.StringBuffer b,
                               java.lang.Object o)
Writes a JACOB Object tree.


writeSimplifiedObject

public static void writeSimplifiedObject(java.lang.StringBuffer b,
                                         java.lang.Object o)

writeObject

public static java.lang.String writeObject(java.lang.Object o)

toGZIP

public static byte[] toGZIP(Base o)

writeObject

public static void writeObject(java.io.PrintStream out,
                               java.lang.Object o)

newAsciiOutStream

public static final OutStream newAsciiOutStream(java.io.OutputStream fd)

newBinaryOutStream

public static final OutStream newBinaryOutStream(java.io.OutputStream fd)

newOutStream

public static final OutStream newOutStream(java.io.OutputStream fd)

newAsciiOutStream

public static final OutStream newAsciiOutStream(MemoryBuffer mb)

newBinaryOutStream

public static final OutStream newBinaryOutStream(MemoryBuffer mb)

newOutStream

public static final OutStream newOutStream(MemoryBuffer mb)

writeObject

public abstract void writeObject(Base o)

writeMultipleObjects

public void writeMultipleObjects(BaseList list)

notifyWriteReplacer

public Base notifyWriteReplacer(Base obj,
                                boolean written)

writeBaseClasses

public abstract void writeBaseClasses(Base o,
                                      int basen,
                                      StreamerSupport s)

writeBaseClasses

public void writeBaseClasses(Base o,
                             StreamerSupport s)

putBool

public abstract void putBool(boolean v,
                             int n,
                             boolean d,
                             StreamerSupport s)

putChar

public abstract void putChar(char v,
                             int n,
                             char d,
                             StreamerSupport s)

putByte

public abstract void putByte(byte v,
                             int n,
                             byte d,
                             StreamerSupport s)

putShort

public abstract void putShort(short v,
                              int n,
                              short d,
                              StreamerSupport s)

putInt

public abstract void putInt(int v,
                            int n,
                            int d,
                            StreamerSupport s)

putLong

public abstract void putLong(long v,
                             int n,
                             long d,
                             StreamerSupport s)

putString

public abstract void putString(java.lang.String v,
                               int n,
                               java.lang.String d,
                               StreamerSupport s)

putFilename

public void putFilename(java.lang.String v,
                        int n,
                        java.lang.String d,
                        StreamerSupport s)

putEnum

public abstract void putEnum(int v,
                             int n,
                             int d,
                             StreamerSupport s,
                             aos.apib.EnumInfo i)

putFloat

public abstract void putFloat(float v,
                              int n,
                              float d,
                              StreamerSupport s)

putDouble

public abstract void putDouble(double v,
                               int n,
                               double d,
                               StreamerSupport s)

putData

public abstract void putData(byte[] v,
                             int n,
                             byte[] d,
                             StreamerSupport s)

putObject

public abstract void putObject(Base v,
                               int n,
                               Base d,
                               StreamerSupport s)

putOther

public abstract void putOther(java.lang.Object v,
                              int n,
                              java.lang.Object d,
                              StreamerSupport s)

putAggregate

public abstract void putAggregate(Base[] v,
                                  int n,
                                  Base[] d,
                                  StreamerSupport s)

putAggregate

public abstract void putAggregate(Aggregate v,
                                  int n,
                                  Aggregate d,
                                  StreamerSupport s)

addNonApib

public void addNonApib(java.lang.Object o)

reset

public abstract void reset(MemoryBuffer mb)

hasBeenSeen

public boolean hasBeenSeen(java.lang.Object o)

seenMultiple

public boolean seenMultiple(java.lang.Object o)

initSeen

public void initSeen()

JACK 5.4 JACOB Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088