|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.mipav.model.dicomcomm.DICOM_Socket
public class DICOM_Socket
Simple class to setup and the socket and streams.
Field Summary | |
---|---|
boolean |
connected
Flag indicating whether of not the socket is connected. |
InputStream |
inStream
Input stream object acquired from the socket. |
OutputStream |
outStream
Output stream object acquired from the socket. |
Socket |
socket
Socket object. |
static int |
timeout
DOCUMENT ME! |
Constructor Summary | |
---|---|
DICOM_Socket()
DICOMSocket constructor. |
Method Summary | |
---|---|
void |
attach(Socket socket)
Attaches this DICOMSocket to a JAVA socket. |
void |
close()
Closes the socket. |
void |
open(String ip,
int port)
Open (and connect) a socket. |
int |
readBinary(byte[] data,
int count)
Low level socket read. |
void |
writeBinary(byte[] data,
int offset,
int count)
Low level socket write. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int timeout
public boolean connected
public InputStream inStream
public OutputStream outStream
public Socket socket
Constructor Detail |
---|
public DICOM_Socket()
Method Detail |
---|
public void attach(Socket socket) throws DICOM_Exception
socket
- the socket to attach
DICOM_Exception
- DOCUMENT ME!public void close()
public void open(String ip, int port) throws DICOM_Exception
ip
- the ip address to connect toport
- the port number to connect to
DICOM_Exception
- DOCUMENT ME!public int readBinary(byte[] data, int count) throws DICOM_Exception
data
- buffer to store the datacount
- number of bytes to be read
DICOM_Exception
- DOCUMENT ME!public void writeBinary(byte[] data, int offset, int count) throws DICOM_Exception
data
- buffer of data send out the port (connection)\offset
- offsetcount
- number of bytes to be sent
DICOM_Exception
- DOCUMENT ME!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |