DataInputStream « Socket « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » Socket » DataInputStream 

1. What does -1 from DataInputStream's read() mean?    stackoverflow.com

According to Java documentation, the read() method returns:

  • -1 if there is no more data because the end the stream has been reached
I don't quite understand what they mean by "end of ...

2. DataInputStream readByte blocked / hanging    stackoverflow.com

I'm looking at the code for a server that creates a thread to handle each incoming connection. The problem is that for some reason on a bunch of threads, the ...

3. DataInputStream's readFully query    stackoverflow.com

I am using dataInputStream's readFully message to read a fixed length byte array as:

byte[] record = new byte[4660004];

in.readFully(record);
The problem here is that sometimes it takes more than 5 seconds to read ...

4. Java DataInputStream length    stackoverflow.com

I am creating a file server application for school assignment. What I currently have is a simple Client class that sends an image through TCP and a Server class that receives ...

5. Sockets and DataInputStream    stackoverflow.com

I am trying to understand this snippet of code

        DataInputStream stream = 
          new DataInputStream(
 ...

6. Is dataInputStream of a Socket know how to deal with multiple writings to it?    stackoverflow.com

I am developing a Net game, in general: I have a server which launch a serverThread for each client that has connected to it.
Its purpose is to listen to messages ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.