|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.extex.engine.backend.NamedOutputStream
public class NamedOutputStream
This class provides a delegate to an output stream with an additional name.
| Constructor Summary | |
|---|---|
NamedOutputStream(java.lang.String name,
java.io.OutputStream stream)
Creates a new object. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this output stream and releases any system resources associated with this stream. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
java.lang.String |
getName()
Getter for the destination. |
int |
hashCode()
Returns a hash code value for the object. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array
to this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NamedOutputStream(java.lang.String name,
java.io.OutputStream stream)
name - the namestream - the stream| Method Detail |
|---|
public void close()
throws java.io.IOException
close
is that it closes the output stream. A closed stream cannot perform
output operations and cannot be reopened.
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.OutputStream.close()public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.equals(java.lang.Object)
public void flush()
throws java.io.IOException
flush is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if an I/O error occurs.OutputStream.flush()public java.lang.String getName()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
public void write(byte[] b)
throws java.io.IOException
b.length bytes from the specified byte array
to this output stream. The general contract for write(b)
is that it should have exactly the same effect as the call
write(b, 0, b.length).
write in class java.io.OutputStreamb - the data.
java.io.IOException - if an I/O error occurs.OutputStream.write(byte[])
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
len bytes from the specified byte array
starting at offset off to this output stream.
write in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.
java.io.IOException - if an I/O error occurs. In particular,
an IOException is thrown if the output
stream is closed.OutputStream.write(byte[], int, int)
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte.
java.io.IOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.OutputStream.write(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||