|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
net.jxta.socket.JxtaSocketOutputStream
public class JxtaSocketOutputStream
This class implements a buffered output stream. By setting up such an output stream, an application can write bytes to the underlying output stream without necessarily causing a call to the underlying system for each byte written. Data buffer is flushed to the underlaying stream, when it is full, or an explicit call to flush is made.
| Field Summary | |
|---|---|
protected byte[] |
buf
Data buffer |
protected int |
count
byte count in buffer |
protected JxtaSocket |
socket
JxtaSocket associated with this stream |
| Constructor Summary | |
|---|---|
JxtaSocketOutputStream(JxtaSocket socket)
Constructor for the JxtaSocketOutputStream object |
|
JxtaSocketOutputStream(JxtaSocket socket,
int size)
Constructor for the JxtaSocketOutputStream object |
|
| Method Summary | |
|---|---|
void |
flush()
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] buf
protected int count
protected JxtaSocket socket
| Constructor Detail |
|---|
public JxtaSocketOutputStream(JxtaSocket socket)
socket - JxtaSocket associated with this stream
public JxtaSocketOutputStream(JxtaSocket socket,
int size)
socket - JxtaSocket associated with this streamsize - buffer size in bytes| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamIOException
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOException
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||