changed Rawdata to use IOUtils to copy inputStream to outputStream