|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.io.ByteArrayEndPoint
public class ByteArrayEndPoint
ByteArrayEndPoint.
| Field Summary | |
|---|---|
(package private) boolean |
_closed
|
(package private) ByteArrayBuffer |
_in
|
(package private) byte[] |
_inBytes
|
(package private) ByteArrayBuffer |
_out
|
| Constructor Summary | |
|---|---|
ByteArrayEndPoint()
|
|
ByteArrayEndPoint(byte[] input,
int outputSize)
|
|
| Method Summary | |
|---|---|
void |
blockReadable(long millisecs)
|
void |
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. |
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. |
Object |
getConnection()
|
ByteArrayBuffer |
getIn()
|
String |
getLocalAddr()
|
String |
getLocalHost()
|
int |
getLocalPort()
|
ByteArrayBuffer |
getOut()
|
String |
getRemoteAddr()
|
String |
getRemoteHost()
|
int |
getRemotePort()
|
boolean |
isBlocking()
|
boolean |
isOpen()
|
void |
reset()
|
void |
setIn(ByteArrayBuffer in)
|
void |
setOut(ByteArrayBuffer out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
byte[] _inBytes
ByteArrayBuffer _in
ByteArrayBuffer _out
boolean _closed
| Constructor Detail |
|---|
public ByteArrayEndPoint()
public ByteArrayEndPoint(byte[] input,
int outputSize)
| Method Detail |
|---|
public ByteArrayBuffer getIn()
public void setIn(ByteArrayBuffer in)
in - The in to set.public ByteArrayBuffer getOut()
public void setOut(ByteArrayBuffer out)
out - The out to set.public boolean isOpen()
isOpen in interface EndPointpublic boolean isBlocking()
isBlocking in interface EndPointpublic void blockReadable(long millisecs)
blockReadable in interface EndPointpublic void blockWritable(long millisecs)
blockWritable in interface EndPoint
public void close()
throws IOException
EndPoint
close in interface EndPointIOException
public int fill(Buffer buffer)
throws IOException
EndPoint
fill in interface EndPointint value indicating the number of bytes
filled or -1 if EOF is reached.
IOException
public int flush(Buffer buffer)
throws IOException
EndPoint
flush in interface EndPointbuffer - The buffer to flush. This buffers getIndex is updated.
IOException
public int flush(Buffer header,
Buffer buffer,
Buffer trailer)
throws IOException
EndPoint
flush in interface EndPointheader - 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.
IOExceptionpublic void reset()
public String getLocalAddr()
getLocalAddr in interface EndPointpublic String getLocalHost()
getLocalHost in interface EndPointpublic int getLocalPort()
getLocalPort in interface EndPointpublic String getRemoteAddr()
getRemoteAddr in interface EndPointpublic String getRemoteHost()
getRemoteHost in interface EndPointpublic int getRemotePort()
getRemotePort in interface EndPointpublic Object getConnection()
getConnection in interface EndPoint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||