|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.karb.hitcryptoproxy.HitSocket
public class HitSocket
Utility-Class that holds a socket, the socket's outputstream as print stream and the socket's inputstream as buffered reader
| Constructor Summary | |
|---|---|
HitSocket(java.net.Socket pSocket)
Constructor that creates a HitSocket object for a given socket. |
|
| Method Summary | |
|---|---|
void |
close()
closes the socket and its buffered reader and print stream |
void |
finalize()
|
void |
flush()
Flushes the print stream, if it is not null. |
boolean |
isClosed()
Returns the closed state of the socket. |
boolean |
isConnected()
Returns the connection state of the socket. |
void |
print(java.lang.String line)
Prints a string, if the print stream is not null. |
java.lang.String |
readLine()
Reads a line of text of the buffered reader. |
void |
setSoTimeout(int timeout)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HitSocket(java.net.Socket pSocket)
throws java.io.IOException
pSocket - the given socket
java.io.IOException - if an I/O error occurs when creating the output stream or
input stream or if the socket is closed or is not connected
or if the socket input has been shutdown using
Socket.shutdownInput()| Method Detail |
|---|
public void close()
public java.lang.String readLine()
throws java.io.IOException
java.io.IOException - If an I/O error occurspublic void print(java.lang.String line)
null then the string "null" is printed.
Otherwise, the string's characters are converted into bytes according to
the platform's default character encoding, and these bytes are written in
exactly the manner of the PrintStream.write(int)
method.
line - The String to be printedpublic void flush()
OutputStream.flush()public boolean isClosed()
public boolean isConnected()
public void setSoTimeout(int timeout)
throws java.net.SocketException
timeout -
java.net.SocketExceptionSocket.setSoTimeout(int)
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableObject.finalize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||