Skip to main content

bypass exception

3 replies [Last post]
chopficaro
Offline
Joined: 2010-05-01

my program was catching an exception that threw me off for a bit but i finally figured it out. my program was trying to convert the contents of a binary file to a string and perform regular expressions on it. is there a way to detect if a file is binary, or is there a way to not make my program throw or catch an exception here? just to tell u this is fine if my program tries to do this, but it cant stop, it hast to keep going.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rturnbull
Offline
Joined: 2005-08-27

Maybe you should try the general desktop forum for non Swing questions
http://forums.java.net/jive/forum.jspa?forumID=66

kleopatra
Offline
Joined: 2003-06-11

reported abuse for constantly spamming this forum with unrelated questions

Jeanette

leo_test
Offline
Joined: 2004-04-27

I wouldn't expect that there is much the chance to test it - except you make it indiviudally. i.e. to read the first xxx bytes, check if it contains some CRLF (depending on the OS) and that's it. The Java char-reader just converts the bytes into chars. And if there is no CRLF then it continues to read.....