List of utility methods to do FileOutputStream Write Byte Array
void | writeBytes(byte[] bytes, String file) write Bytes FileOutputStream fos = new FileOutputStream(file);
fos.write(bytes);
fos.close();
|
void | writeBytes(byte[] data, File file) write Bytes FileOutputStream out = new FileOutputStream(file); try { writeBytes(data, out); } finally { out.close(); |
void | writeBytes(File aFile, byte theBytes[]) Writes the given bytes (within the specified range) to the given file. if (theBytes == null) { aFile.delete(); return; FileOutputStream fileStream = new FileOutputStream(aFile); fileStream.write(theBytes); fileStream.close(); |
void | writeBytes(File dest, byte[] data, int off, int len, boolean append) write Bytes if (dest.exists()) { if (!dest.isFile()) { throw new IOException("Not a file: " + dest); FileOutputStream out = null; try { out = new FileOutputStream(dest, append); ... |
boolean | writeBytes(File f, byte[] b) write Bytes BufferedOutputStream bos = null; try { bos = new BufferedOutputStream(new FileOutputStream(f)); bos.write(b); return true; } catch (Exception e) { e.printStackTrace(); return false; ... |
void | writeBytes(File f, byte[] data) write Bytes byte[] buf = new byte[1024]; BufferedOutputStream bos = null; ByteArrayInputStream bais = null; try { bos = new BufferedOutputStream(new FileOutputStream(f)); bais = new ByteArrayInputStream(data); int len; while ((len = bais.read(buf)) > 0) { ... |
void | writeBytes(File file, byte[] arr) write Bytes try (FileOutputStream out = new FileOutputStream(file)) { out.write(arr); |
void | writeBytes(File file, byte[] ba) write Bytes FileOutputStream a = null; try { a = new FileOutputStream(file); a.write(ba); } finally { if (a != null) { a.close(); |
void | writeBytes(File file, byte[] bytes) write Bytes BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file)); bos.write(bytes); bos.flush(); bos.close(); |
void | writeBytes(File file, byte[] bytes) write Bytes FileOutputStream fos = new FileOutputStream(file);
fos.write(bytes);
fos.flush();
fos.close();
|