Below code showing the NullPointerException after writing the file why it showing this .
OutputStream opStream = null;
try {
opStream = new FileOutputStream(wavFilePath);
opStream.write(wavData);
opStream.flush();
opStream.close();
} finally {
if (opStream!=null)
opStream.close();
opStream = null;
}
java.lang.NullPointerException at java.io.FileOutputStream.write(Unknown Source)
– monty May 30 '17 at 12:34java.lang.NullPointerException at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
– monty May 30 '17 at 12:37