org.mortbay.io.bio
public class StreamEndPoint extends java.lang.Object implements EndPoint
Constructor and Description |
---|
StreamEndPoint(java.io.InputStream in,
java.io.OutputStream out) |
Modifier and Type | Method and Description |
---|---|
boolean |
blockReadable(long millisecs) |
boolean |
blockWritable(long millisecs) |
void |
close()
Close any backing stream associated with the buffer
|
int |
fill(Buffer buffer)
Fill the buffer from the current putIndex to it's capacity from whatever
byte source is backing the buffer.
|
void |
flush()
Flush any buffered output.
|
int |
flush(Buffer buffer)
Flush the buffer from the current getIndex to it's putIndex using whatever byte
sink is backing the buffer.
|
int |
flush(Buffer header,
Buffer buffer,
Buffer trailer)
Flush the buffer from the current getIndex to it's putIndex using whatever byte
sink is backing the buffer.
|
java.io.InputStream |
getInputStream() |
java.lang.String |
getLocalAddr() |
java.lang.String |
getLocalHost() |
int |
getLocalPort() |
java.io.OutputStream |
getOutputStream() |
java.lang.String |
getRemoteAddr() |
java.lang.String |
getRemoteHost() |
int |
getRemotePort() |
java.lang.Object |
getTransport() |
boolean |
isBlocking() |
boolean |
isBufferingInput() |
boolean |
isBufferingOutput() |
boolean |
isBufferred() |
boolean |
isClosed() |
boolean |
isOpen() |
void |
setInputStream(java.io.InputStream in) |
void |
setOutputStream(java.io.OutputStream out) |
void |
shutdownOutput()
Shutdown any backing output stream associated with the endpoint
|
public StreamEndPoint(java.io.InputStream in, java.io.OutputStream out)
public boolean isBlocking()
isBlocking
in interface EndPoint
public boolean blockReadable(long millisecs) throws java.io.IOException
blockReadable
in interface EndPoint
java.io.IOException
public boolean blockWritable(long millisecs) throws java.io.IOException
blockWritable
in interface EndPoint
java.io.IOException
public final boolean isClosed()
public void shutdownOutput() throws java.io.IOException
EndPoint
shutdownOutput
in interface EndPoint
java.io.IOException
public void close() throws java.io.IOException
EndPoint
public int fill(Buffer buffer) throws java.io.IOException
EndPoint
public int flush(Buffer buffer) throws java.io.IOException
EndPoint
public int flush(Buffer header, Buffer buffer, Buffer trailer) throws java.io.IOException
EndPoint
flush
in interface EndPoint
header
- A buffer to write before flushing this buffer. This buffers getIndex is updated.buffer
- The buffer to flush. This buffers getIndex is updated.trailer
- A buffer to write after flushing this buffer. This buffers getIndex is updated.java.io.IOException
public java.lang.String getLocalAddr()
getLocalAddr
in interface EndPoint
EndPoint
is bound, or null
if this EndPoint
does not represent a network connection.public java.lang.String getLocalHost()
getLocalHost
in interface EndPoint
EndPoint
is bound, or null
if this EndPoint
does not represent a network connection.public int getLocalPort()
getLocalPort
in interface EndPoint
EndPoint
is listening, or 0
if this EndPoint
does not represent a network connection.public java.lang.String getRemoteAddr()
getRemoteAddr
in interface EndPoint
EndPoint
is connected, or null
if this EndPoint
does not represent a network connection.public java.lang.String getRemoteHost()
getRemoteHost
in interface EndPoint
EndPoint
is connected, or null
if this EndPoint
does not represent a network connection.public int getRemotePort()
getRemotePort
in interface EndPoint
EndPoint
is connected, or 0
if this EndPoint
does not represent a network connection.public java.lang.Object getTransport()
getTransport
in interface EndPoint
public java.io.InputStream getInputStream()
public void setInputStream(java.io.InputStream in)
public java.io.OutputStream getOutputStream()
public void setOutputStream(java.io.OutputStream out)
public void flush() throws java.io.IOException
EndPoint
public boolean isBufferingInput()
isBufferingInput
in interface EndPoint
public boolean isBufferingOutput()
isBufferingOutput
in interface EndPoint
public boolean isBufferred()
isBufferred
in interface EndPoint
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.