com.plumtree.openfoundation.io
Class XPOutputStream

java.lang.Object
  extended bycom.plumtree.openfoundation.io.XPOutputStream
Direct Known Subclasses:
XPFileOutputStream

public class XPOutputStream
extends java.lang.Object

XPOutputStream corresponds to java.io.OutputStream or System.IO.Stream.


Constructor Summary
protected XPOutputStream()
          Constructs a XPOutputStream object.
  XPOutputStream(java.io.OutputStream stream)
          Creates a new XPOutputStream object.
 
Method Summary
 void Close()
          Closes this output stream and releases any system resources associated with this stream.
 void Flush()
          Flushes this output stream and forces any buffered output bytes to be written out.
 java.io.OutputStream GetUnderlyingObject()
          Return the underlying platform-specific object.
 void Write(byte[] buffer)
          Write a buffer of bytes (typically encoded characters) to the underlying output stream.
 void Write(byte[] buffer, int offset, int count)
          Write part of a buffer of bytes (typically encoded characters) to the underlying output stream.
 void Write(int b)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPOutputStream

protected XPOutputStream()
Constructs a XPOutputStream object.


XPOutputStream

public XPOutputStream(java.io.OutputStream stream)
Creates a new XPOutputStream object.

Parameters:
stream - A OutputStream object.
Method Detail

Close

public void Close()
Closes this output stream and releases any system resources associated with this stream.

Throws:
XPIOException - If an I/O error occurs.

Flush

public void Flush()
Flushes this output stream and forces any buffered output bytes to be written out.

Throws:
XPIOException - If an I/O error occurs.

Write

public void Write(int b)
Writes the specified byte to this output stream.

Parameters:
b - the byte.
Throws:
XPIOException - If an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.

Write

public void Write(byte[] buffer)
Write a buffer of bytes (typically encoded characters) to the underlying output stream.

Parameters:
buffer - the data.
Throws:
XPIOException - if an I/O error occurs.

Write

public void Write(byte[] buffer,
                  int offset,
                  int count)
Write part of a buffer of bytes (typically encoded characters) to the underlying output stream.

Parameters:
buffer - the data.
offset - the start offset in the data.
count - the number of bytes to write.
Throws:
XPIOException - if an I/O error occurs.

GetUnderlyingObject

public java.io.OutputStream GetUnderlyingObject()
Return the underlying platform-specific object.

Returns:
OutputStream A OutputStream object.


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.