Buongiono a tutti,
è il mio primo post spero vivamente di non aver sbagliato sezione. Ho creato un webservice in java, tra i metodi del mio webservice c'è ne uno che mi dovrebbe permettere di scaricare un file.
L'ho implementato in questa maniera:

codice:
@WebMethod(operationName = "download")      public FileOutputStream download(@WebParam(name = "dir") String dir,@WebParam(name = "nome") String nome)      throws IOException {                 File file = new File("C:\\Log\\" + dir + "\\" + nome);                                  FileInputStream fileIn = new FileInputStream(file);                 FileOutputStream outputStream = new FileOutputStream(file);                                  byte[] outputByte = new byte[4096];                 //copy binary contect to output stream                 while(fileIn.read(outputByte, 0, 4096) != -1)                 {                     outputStream.write(outputByte, 0, 4096);                 }                 fileIn.close();                 outputStream.flush();                 outputStream.close();                 return outputStream;      }
Il seguente codice però mi genera una eccezione e non so veramente piu che pesci prendere.
Qualcuno ha qualche idea a riguardo?

grazie mille a tutti in anticipo