Main Page   Packages   Class Hierarchy   Compound List   Compound Members   Related Pages  

Sct::File.OStreamFile Class Reference

Writes directly to a file using a binary representation Uses the NIO classes for speed, but doesn't use memory-mapped files on the assumption that the file size will be small. More...

List of all members.

Public Member Functions

 OStreamFile (NameFile name) throws IOException
 Creates a new instance of OStreamFile.

 OStreamFile (byte[] output)
 Creates an OStreamFile that writes to a given byte[] The given array must be large enough to hold all the object being written.

void close () throws IOException
 This must be called to close the underlying stream.

void writeBoolean (String name, boolean b) throws java.io.IOException
void writeBooleanArray (String name, boolean[] b) throws java.io.IOException
void writeByte (String name, byte b, boolean sign) throws java.io.IOException
void writeByteArray (String name, byte[] b, boolean sign) throws java.io.IOException
void writeDouble (String name, double d) throws java.io.IOException
void writeDoubleArray (String name, double[] d) throws java.io.IOException
void writeFloat (String name, float f) throws java.io.IOException
void writeFloatArray (String name, float[] f) throws java.io.IOException
void writeInt (String name, int i, boolean sign) throws java.io.IOException
void writeIntArray (String name, int[] i, boolean sign) throws java.io.IOException
void writeLong (String name, long i, boolean sign) throws java.io.IOException
void writeLongArray (String name, long[] i, boolean sign) throws java.io.IOException
void writeShort (String name, short s, boolean sign) throws java.io.IOException
void writeShortArray (String name, short[] s, boolean sign) throws java.io.IOException
void writeString (String name, String s) throws java.io.IOException
void writeStringArray (String name, String[] s) throws java.io.IOException


Detailed Description

Writes directly to a file using a binary representation Uses the NIO classes for speed, but doesn't use memory-mapped files on the assumption that the file size will be small.

Author:
Matthew Palmer


Constructor & Destructor Documentation

Sct.File.OStreamFile.OStreamFile byte    output[]
 

Creates an OStreamFile that writes to a given byte[] The given array must be large enough to hold all the object being written.

If not, the array will contain the last section of the data. The object probably ends when the last contiguous block of zeros starts.

Parameters:
output the array which will be filled with the binary representation of the object.


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:38:52 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3