ca.idms.io
Class NativeBuffer

java.lang.Object
  extended by ca.idms.io.TraceObject
      extended by ca.idms.io.NativeObject
          extended by ca.idms.io.NativeBuffer
All Implemented Interfaces:
Native, Trace

public class NativeBuffer
extends NativeObject

A NativeBuffer is used to pass a data buffer between NativeDataInput and NativeDataOutput streams. The readNative and writeNative methods pass a reference to buffer instead of copying its contents. When the object is read it is linked to the buffer in the input stream. When it is written it links itself to the output stream.

Version:
2.0, 02/01/05
Author:
Dave Ross
See Also:
NativeObject, NativeDataInputStream, NativeDataOutputStream

Field Summary
 
Fields inherited from class ca.idms.io.NativeObject
buffer, length, offset
 
Fields inherited from class ca.idms.io.TraceObject
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE
 
Constructor Summary
NativeBuffer()
           
 
Method Summary
 void readNative(NativeDataInputStream in)
          Gets the internal buffer from the input stream buffer.
 void writeNative(NativeDataOutputStream out)
          Sets the output stream buffer from the internal buffer.
 
Methods inherited from class ca.idms.io.NativeObject
get, getBuffer, getClient, getOffset, length, length, readBuffer, snap, writeBuffer
 
Methods inherited from class ca.idms.io.TraceObject
finalize, getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeBuffer

public NativeBuffer()
Method Detail

readNative

public void readNative(NativeDataInputStream in)
                throws java.io.IOException
Gets the internal buffer from the input stream buffer.

Specified by:
readNative in interface Native
Overrides:
readNative in class NativeObject
Parameters:
in - the native buffered input stream
Throws:
java.io.IOException - not!

writeNative

public void writeNative(NativeDataOutputStream out)
                 throws java.io.IOException
Sets the output stream buffer from the internal buffer.

Specified by:
writeNative in interface Native
Overrides:
writeNative in class NativeObject
Parameters:
out - the native buffered output stream.
Throws:
java.io.IOException - not!


Copyright © 2009 CA, All rights reserved