я пытаюсь загрузить файл с клиента на сервер
на стороне клиента, у меня есть файл ввода
на стороне сервера, у меня есть
private void uploadFile(final FileTransfer fileTransfer) {
String destinationFile = "/home/nat/test.xls";
InputStream fis = null;
FileOutputStream out = null;
byte buf[] = new byte[1024];
int len;
try {
fis = fileTransfer.getInputStream();
out = new FileOutputStream(new File(destinationFile));
while ((len = fis.read(buf)) > 0) {
out.write(buf, 0, len);
}
}
}
aфайл создается на сервере, но при отладке он пуст, я вижу, что fis не равен нулю
есть идеи?