com.haley.haleyrules
Interface StringOutputStream

All Superinterfaces:
KnowledgeBaseObject, OutputStream, Stream, WorkingMemoryObject

public interface StringOutputStream
extends OutputStream

The StringOutputStream interface represents an OutputStream that writes it's content to an in-memory character array.

See Also:
WorkingMemory.newOutputStream(String, int)

Method Summary
 void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
          Characters are copied from this stream into the destination character array.
 int length()
          Returns the length of the data in the stream
 void reset()
          Resets the string to output at the beginning
 java.lang.String toString()
          Converts the data in the stream to a string
 
Methods inherited from interface com.haley.haleyrules.Stream
close, getName
 
Methods inherited from interface com.haley.haleyrules.WorkingMemoryObject
getWorkingMemory
 
Methods inherited from interface com.haley.haleyrules.KnowledgeBaseObject
getKnowledgeBase, release
 

Method Detail

reset

public void reset()
Resets the string to output at the beginning


toString

public java.lang.String toString()
Converts the data in the stream to a string

Returns:
a string representation of the stream

length

public int length()
Returns the length of the data in the stream

Returns:
the length of the data in the stream

getChars

public void getChars(int srcBegin,
                     int srcEnd,
                     char[] dst,
                     int dstBegin)
Characters are copied from this stream into the destination character array. It functions the same as StringBuffer.getChars(int,int,char[],int)

Parameters:
srcBegin - the first character to copy
srcEnd - the last character is ar srcEnd-1
dst - the destination character array
dstBegin - the index to start copying character to


Copyright © 1998-2006 Haley Systems, Inc. All Rights Reserved.