Исправлены ошибки в FileOperation

This commit is contained in:
Victor 2013-07-11 18:14:44 +03:00
parent f32d1d0500
commit a18429cc5a

View File

@ -29,12 +29,11 @@ public class FileOperation extends Operation {
fout.write(buffer, 0, count); fout.write(buffer, 0, count);
} }
fout.flush(); fout.flush();
fout.close();
} catch (IOException ex) { } catch (IOException ex) {
ExceptionHandler.handle(ex); ExceptionHandler.handle(ex);
} finally { } finally {
try { try {
fout.close(); if (fout != null) fout.close();
} catch (IOException ex) { } catch (IOException ex) {
ExceptionHandler.handle(ex); ExceptionHandler.handle(ex);
} }
@ -43,7 +42,8 @@ public class FileOperation extends Operation {
@Override @Override
public void startClientSide(Object... params) throws Exception { public void startClientSide(Object... params) throws Exception {
File file = (File) params[0]; String filePath = (String) params[0];
File file = new File(filePath);
dos.writeInt(OperationListener.MODE_FILE_TRANSFER); dos.writeInt(OperationListener.MODE_FILE_TRANSFER);