aspose file tools*
The moose likes I/O and Streams and the fly likes Byte[] transfer problems : ( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Byte[] transfer problems : (" Watch "Byte[] transfer problems : (" New topic
Author

Byte[] transfer problems : (

Zac Styris
Greenhorn

Joined: Nov 04, 2005
Posts: 14
Hi All

I have a bluetooth phone application and a PC server appliction where i'm sending a picture taken from the phone to the server via bluetooth, i'm sending the image as an byte[] using dataoutput stream n receiving in an input stream, this method only excutes for small images like less than 40kb, and gets stuck for larger sizes, i'm really in need of sending images more like in the range of 600kb,someone please help me with this issue.

Thanks
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
I am working on a similar project in which I have to send images from a PC to the phone. I've came across a similar problem. Check this article out. It may help.

http://java.sun.com/developer/technicalArticles/Programming/compression/

By the way. Are you using J2SE on the PC side? If so what type of connection are you using? RFCOMM?
Zac Styris
Greenhorn

Joined: Nov 04, 2005
Posts: 14
Thanks for the reply. Well i actually got it working by breaking the byte[] in to small 20kb chunks and sending one chunk n waiting for like 200 millisendons before sending the other one. now it works for me, if u dun wait for a while after each chunk again the channel gets stuck.

Yea i'm using J2SE with bluecove package in the PC side and a RFCOMM serial port connection.

Thanks
saad sal
Greenhorn

Joined: Jul 31, 2005
Posts: 25
Hi again,
I was having some trouble with the BlueCove connection. I have setup the BlueCove on the PC and it is working fine and the server "waits for client connections."
Here is the J2ME code I am using for the client side.


There is no build or run error in the code, but when I run the application it is unable to find any server.
I am running this on a Nokia 6630 whereas the server runs on the PC.

I would appreciate any help i can get.
[ February 05, 2006: Message edited by: Jim Yingst ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Saad, please do not post the same question in multiple forums. I see you've already posted additional information in the J2ME forum which makes this topic out of date. Anyone posting a followup should refer to the J2ME post before posting here.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Byte[] transfer problems : (