Ticket #23051

Socket error

Eröffnet am: 2010-09-07 12:07 Letztes Update: 2010-09-07 12:21

Auswertung:
Verantwortlicher:
Typ:
Status:
Offen [Owner assigned]
Komponente:
Meilenstein:
Priorität:
7
Schweregrad:
7
Lösung:
Keine
Datei:
Keine

Details

Error. Socket do not detect end of read from inputstream. Reference: (b = fi.read()) != -1 and do not detect socket timeout error. Tested with Mysaifu v 0.4.8 and SO Windows Mobile 6.1

OutputStream os = null; FileInputStream fi = null; BufferedOutputStream bos = null; try { System.out.println("Writing to: " + s.getRemoteSocketAddress() + " at " + new Date()); os = s.getOutputStream(); bos = new BufferedOutputStream(os); fi = new FileInputStream(fileBDZip); int b = -1, i = 0; while ((b = fi.read()) != -1) { bos.write(b); i++; if (i % 10240 == 0) { System.out.println((i / 1024) + " at " + new Date()); } } System.out.println("End Write at " + new Date()); fi.close();

bos.flush(); bos.close(); os.close(); s.close(); } catch (Exception e) { try { if (fi != null) { fi.close(); } if (bos != null) { bos.close(); } if (os != null) { os.close(); } s.close(); e.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); } }

Ticket-Verlauf (2/2 Historien)

2010-09-07 12:07 Aktualisiert von: rafa
  • New Ticket "Socket error" created
2010-09-07 12:21 Aktualisiert von: rafa
  • Details Updated

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden