• Post Reply Bookmark Topic Watch Topic
  • New Topic

writing hex to a dataoutputstream  RSS feed

 
Scott A Burch
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It compiles and runs, but system exit is being invoked in the dataoutputstream section "System.err.println("Caught IOException: xxxx "); " around line 80. It could be writing hex to the datastream all wrong, or it's the wrong stream ( bytearray stream? ), or it's not getting the Socket ipAddress and port parameters and timing out, or all the above. Any suggestions? Thanks !


 
Knute Snortum
Sheriff
Posts: 4281
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think line 32 should be

 
Scott A Burch
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Just for my education, what does that change do in terms of performance?
 
Knute Snortum
Sheriff
Posts: 4281
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think performance is the issue. When you write


you create a socket that exists only in the try block. I don't think it will work at all.
 
Scott A Burch
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Made the change and it works perfectly. Thanks again!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!