The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

ask for help on ArrayList

Posted by Jane on July 25, 2001 at 12:26 AM

I have an ArrayList and want to transport it through network by using UDP DatagramPacket. I code it like following:

ArrayList myAlist[80];
byte [] myAlist=multiDatalist.getBytes("latin1");
DatagramPacket packet1=new DatagramPacket (myAlist,myAlist.length,InetAddress.getByName("239.22.22.22"),3000);
socket.send(packet1);

But there is a problem on" getBytes("latin1")", Does it mean that ArrayList can not be transferred as String across the net? How should I deal with that?
Thanks.




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us