public class RpcStreamImpl<S,R> extends Object implements RpcStream, BidiStream<S,R>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
error |
protected ObjectInputChannel |
in |
protected ObjectOutputChannel |
out |
protected Socket |
socket |
| Constructor and Description |
|---|
RpcStreamImpl(Socket socket) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
flush() |
long |
getBytesRead() |
long |
getBytesWritten() |
InetSocketAddress |
getLocalAddress() |
InetSocketAddress |
getRemoteAddress() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
read(ByteBuffer buf) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
Object |
readObject() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
R |
receive() |
void |
send(S object) |
R |
sendAndGet(S object) |
long |
skip(long n) |
int |
skipBytes(int n) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer buf) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeObject(Object obj) |
void |
writeShort(int v) |
void |
writeUTF(String s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatecreatecreateprotected final Socket socket
protected final ObjectInputChannel in
protected final ObjectOutputChannel out
protected boolean error
public RpcStreamImpl(Socket socket)
public InetSocketAddress getLocalAddress()
getLocalAddress in interface BaseStreampublic InetSocketAddress getRemoteAddress()
getRemoteAddress in interface BaseStreampublic long getBytesRead()
getBytesRead in interface BaseStreampublic long getBytesWritten()
getBytesWritten in interface BaseStreampublic void read(ByteBuffer buf) throws IOException
read in interface RpcStreamIOExceptionpublic Object readObject() throws IOException, ClassNotFoundException
readObject in interface ObjectInputIOExceptionClassNotFoundExceptionpublic int read()
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b)
throws IOException
read in interface ObjectInputIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in interface ObjectInputIOExceptionpublic long skip(long n)
throws IOException
skip in interface ObjectInputIOExceptionpublic int available()
available in interface ObjectInputpublic void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic void write(ByteBuffer buf) throws IOException
write in interface RpcStreamIOExceptionpublic void writeObject(Object obj) throws IOException
writeObject in interface ObjectOutputIOExceptionpublic void write(int b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOExceptionpublic void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOExceptionpublic void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOExceptionpublic void writeLong(long v)
throws IOException
writeLong in interface DataOutputIOExceptionpublic void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOExceptionpublic void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOExceptionpublic void writeBytes(String s) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF in interface DataOutputIOExceptionpublic void flush()
throws IOException
flush in interface ObjectOutputflush in interface BidiStream<S,R>IOExceptionpublic void close()
close in interface ObjectInputclose in interface ObjectOutputclose in interface AutoCloseableclose in interface BaseStreampublic R receive() throws IOException, ClassNotFoundException
receive in interface ReceiveStream<R>IOExceptionClassNotFoundExceptionpublic void send(S object) throws IOException
send in interface SendStream<S>IOExceptionpublic R sendAndGet(S object) throws IOException, ClassNotFoundException
sendAndGet in interface BidiStream<S,R>IOExceptionClassNotFoundExceptionCopyright © 2019. All rights reserved.