List of utility methods to do FileOutputStream Write
void | save(String f, byte[] data) Save the given byte array as the given file. save(new File(f), data);
|
void | save(String filename, byte[] bytes) save ByteArrayInputStream bais = null; try { bais = new ByteArrayInputStream(bytes); save(filename, bais); bais.close(); bais = null; } catch (IOException ex) { throw new RuntimeException(ex); ... |
void | save(String path, byte[] content, IProgressMonitor monitor) Saves a file. monitor.beginTask("Saving " + path, 1); FileOutputStream out = new FileOutputStream(path); out.write(content); out.flush(); out.close(); |
void | saveArray(byte[] pictureBytes, OutputStream stream) save Array try { stream.write(pictureBytes); } catch (IOException e) { |
void | saveBase64Str2Disk(String base64Str, File file) save Base Str Disk BASE64Decoder decoder = new BASE64Decoder(); FileOutputStream write = new FileOutputStream(file); byte[] decoderBytes = decoder.decodeBuffer(base64Str); write.write(decoderBytes); write.close(); |
void | saveBase64strToFile(String base64Str, String filePath) save Basestr To File BASE64Decoder decoder = new BASE64Decoder(); byte[] b = decoder.decodeBuffer(base64Str); for (int i = 0; i < b.length; ++i) { if (b[i] < 0) { b[i] += 256; OutputStream out = new FileOutputStream(filePath); ... |
void | saveBinaryFile(String fileName, byte[] buffer) save Binary File FileOutputStream fstream = new FileOutputStream(fileName);
fstream.write(buffer);
fstream.close();
|
void | saveByteArrayToFile(final File file, final byte[] array) save Byte Array To File FileOutputStream outStream = null; try { outStream = new FileOutputStream(file); outStream.write(array); outStream.flush(); } finally { if (outStream != null) { try { ... |
void | saveByteFile(byte[] data, String filePath) save Byte File saveByteFile(data, new File(filePath));
|
void | saveBytes(byte[] b, File destFolder, String fileName, String suffix) Saves raw byte data to the chosen output folder, but uses the given file filename + the given suffix OutputStream out = null; try { File f = new File( destFolder.getAbsolutePath() + "/" + fileName.substring(0, fileName.lastIndexOf(".")) + suffix); if (f.exists()) f.delete(); out = new FileOutputStream(f); out.write(b); ... |