org.jSyncManager.API.Protocol.Util

Class DLPRecordWriter


public class DLPRecordWriter
extends Writer

A convenience class for writing a DLPRecord to an OutputStreamWriter stream or Writer stream.
See Also:
DLPRecord, java.io.Writer, java.io.OutputStreamWriter

Constructor Summary

DLPRecordWriter()
Creates a new instance of DLPRecordWriter.
DLPRecordWriter(OutputStreamWriter out)
Creates a new instance of DLPRecordWriter from an OutputStreamWriter instance.
DLPRecordWriter(DLPRecord dlprec, OutputStreamWriter out)
Creates a new instance of DLPRecordWriter using the given DLPRecord and OutputStreamWriter instance.

Method Summary

void
close()
Close the Writer stream.
void
flush()
Flush the Writer stream.
java.io.OutputStreamWriter
getOs()
Getter for property OutputStreamWriter os.
DLPRecord
getRecord()
Getter for property dlprecord.
void
setOs(java.io.OutputStreamWriter os)
Setter for property OutputStreamWriter os.
void
setRecord(DLPRecord dlprecord)
Setter for property dlprecord.
String
toString()
Create a String representation of the class
void
write(String buff)
Write a String to the output stream.
void
write(StringBuffer buff)
Write a StringBuffer to the output stream.
void
write(char[] values)
void
write(char[] values, int offset, int length)
Write a portion of an array of characters.
void
write(int param)

Constructor Details

DLPRecordWriter

public DLPRecordWriter()
Creates a new instance of DLPRecordWriter.

DLPRecordWriter

public DLPRecordWriter(OutputStreamWriter out)
Creates a new instance of DLPRecordWriter from an OutputStreamWriter instance.
Parameters:
out - OutputStreamWriter to be written to.

DLPRecordWriter

public DLPRecordWriter(DLPRecord dlprec,
                       OutputStreamWriter out)
Creates a new instance of DLPRecordWriter using the given DLPRecord and OutputStreamWriter instance.
Parameters:
dlprec - DLPRecord to be written.
out - OutputStreamWriter to be written to.

Method Details

close

public void close()
            throws java.io.IOException
Close the Writer stream.

flush

public void flush()
            throws java.io.IOException
Flush the Writer stream.

getOs

public java.io.OutputStreamWriter getOs()
Getter for property OutputStreamWriter os.
Returns:
OutputStreamWriter Value of property os.

getRecord

public DLPRecord getRecord()
Getter for property dlprecord.
Returns:
Value of property dlprecord.

setOs

public void setOs(java.io.OutputStreamWriter os)
Setter for property OutputStreamWriter os.
Parameters:
os - New OutputStreamWriter value of property os.

setRecord

public void setRecord(DLPRecord dlprecord)
            throws java.io.IOException
Setter for property dlprecord.
Parameters:
dlprecord - New value of property dlprecord.

toString

public String toString()
Create a String representation of the class
Returns:
String String representation

write

public void write(String buff)
            throws java.io.IOException
Write a String to the output stream.
Parameters:
buff - String to be written.

write

public void write(StringBuffer buff)
            throws java.io.IOException
Write a StringBuffer to the output stream.
Parameters:
buff - StringBuffer to be written.

write

public void write(char[] values)
            throws java.io.IOException

write

public void write(char[] values,
                  int offset,
                  int length)
            throws java.io.IOException
Write a portion of an array of characters.
Parameters:
values - Array of characters
offset - Offset from which to start writing characters
length - Number of characters to write

write

public void write(int param)
            throws java.io.IOException