Salve a tutti,
ho un problema nella scrittura di un file su disco durante, la classe che utilizzo è la seguente:
codice:
public static void savefile(String pathApp, String user, String FileName, InputStream is) throws IOException {
File f = new File(pathApp+"\\"+user+"\\" + FileName);
FileOutputStream fos = new FileOutputStream(f);
byte[] buf = new byte[4096];
int bytesRead;
while((bytesRead = is.read(buf))!=1) {
fos.write(buf, 0, bytesRead);
}
fos.close();
}
l'errore che mi dà è il seguente(sulla riga di codice del while...):
com.sun.mail.util.DecodingException: BASE64Decoder: Error in encoded stream: needed at least 2 valid base64 characters, but only got 0 before padding character (=), the 10 most recent characters were: "argin:0px="
qualcuno saprebbe aiutarmi sto impazzendo