byte « UDP « 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 » UDP » byte 

2. Problem sending a file from a UDP server    stackoverflow.com

I am writing a small UDP server in Java. When the server receives a command ('GET_VIDEO'), he reads a file ('video.raw') and then sends it to the client. My problem is ...

3. how can i get the right string from a byte array which is passed over by DatagramSocket    stackoverflow.com

here is the code i send the string:

byte[] buffer = txtAreaSendText.getText().getBytes();// Point A
DatagramPacket dp = new DatagramPacket(buffer,buffer.length,remoteAddr, remoteTextPort);
udpSocket.send(dp);
and here is my code for receiving the string:
byte[] buffer = new byte[1024];
DatagramPacket dp ...

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.