List of utility methods to do Byte Array to File Save
void | byteArrayToFile(byte[] bytes, String filePath) byte Array To File InputStream in = new ByteArrayInputStream(bytes); File destFile = new File(filePath); if (!destFile.getParentFile().exists()) { destFile.getParentFile().mkdirs(); destFile.createNewFile(); OutputStream out = new FileOutputStream(destFile); byte[] cache = new byte[CACHE_SIZE]; ... |
void | bytesToFile(byte[] bytes, String filePath) bytes To File InputStream in = new ByteArrayInputStream(bytes); File destFile = new File(filePath); if (!destFile.getParentFile().exists()) { destFile.getParentFile().mkdirs(); destFile.createNewFile(); OutputStream out = new FileOutputStream(destFile); byte[] cache = new byte[CACHE_SIZE]; ... |
void | byte2file(byte[] data, String path) bytefile if (null == data) return; if (data.length < 3 || path.equals("")) return; try { FileOutputStream imageOutput = new FileOutputStream(new File( path)); imageOutput.write(data, 0, data.length); ... |