RandomAccessFile , , -.
InputStream , . . InputStream , , :
int read() 1, ;
int read(byte b[]) , ;
int read(byte b[], int off, int len) , ;
long skip(long n) n ;
int available() , ;
void mark(int readlimit) , readlimit , , ;
void reset() ;
markSupported() , , ;
void close() .
, . , , . . , .
OutputStream InputStream. :
void write(byte b)
void write(byte b[])
void write(byte b[], int off, int len)
void close()
void flush() .
RandomAccessFile , , -.
File . , , , . .
FileDescriptor .
StreamTokenizer , .
- TCP/IP UDP.
IP , . IP , . IP- DNS- [2].
TCP UDP . TCP 璺 . TCP- .
|
|
. TCP , . , .
璺. TCP 璺, . handshaking . .
. TCP , TCP .
UDP- , , .
UDP :
. UDP (), UDP. .
璺. ͳ 璺. , .
. UDP , .
, TCP. UDP, . , TCP? , . , TCP , . UDP .
- TCP
Java , Java , , TCP/IP. , UNIX, (sockets).
? , , . ' 㳿, , , .
, , IP, , , .
IP . . , " " (well known) , . , 80 Web HTTP.
, .
Java , . :
- ,
- ,
- .
Java , . , , .
|
|
볺 볺 . 볺 , . , .
, . 볺 , 볺.
, . , , , , , . , , , .
UDP, , , IP. TCP.
(socket) 璺. TCP TCP, . TCP :
- IP- 볺 ;
- , 볺 .
, . ³ 볺 . , , 볺 . 볺, , , , . (볺), ().
, -볺 . ( , ), , . , , . , ? , .
. ? ³ , , . , , 1024.