Hi all,

I'm writing some HTTP-code for mobile using J2ME, and I am experiecing some odd behaviour.
What I'm doing is downloading a file using HTTPConnection, and writing it to the file system using FileConnection.
While downloading, I interrupt the WIFI signal and it seems like no exception is thrown (IOException, anyone?), but instead an EOF is signaled (read method returns -1).
Is this normal behaviour? Any clarification would be much appreciated.

int bytesRead;
byte[] buffer = new byte[5000];
while((bytesRead = in.read(buffer)) != -1) {
    out.write(buffer, 0, bytesRead);
    System.out.println("-----------BUFFER WRITE");
System.out.println("-----------BEFORE FLUSH");
System.out.println("-----------AFTER FLUSH");
Thanks in advance.