List of utility methods to do FileOutputStream Write Byte Array
void | writeBytes(File file, byte[] bytes) write Bytes OutputStream out = null; try { out = new FileOutputStream(file); out.write(bytes, 0, bytes.length); } finally { close(out); |
void | writeBytes(File file, byte[] bytes) write Bytes FileOutputStream out = new FileOutputStream(file);
out.write(bytes);
out.close();
|
void | writeBytes(File file, byte[] bytes, boolean append) write Bytes try { FileOutputStream stream = new FileOutputStream(file, append); stream.write(bytes); stream.flush(); stream.close(); } catch (IOException t) { throw new Exception("could not write to " + file + ": " + new String(bytes), t); |
void | writeBytes(File file, byte[] data) write Bytes OutputStream fos = null; OutputStream os = null; try { fos = new FileOutputStream(file); os = new BufferedOutputStream(fos); os.write(data); } finally { try { ... |
void | writeBytes(File file, byte[] pattern, int repeat) write Bytes file.deleteOnExit(); file.getParentFile().mkdirs(); OutputStream out = null; try { out = new BufferedOutputStream(new FileOutputStream(file)); for (int i = 0; i < repeat; i++) { out.write(pattern); out.close(); out = null; } finally { try { if (out != null) { out.close(); } catch (final IOException e) { |
void | writeBytes(File file, byte[] source, int offset, int len) write Bytes if (len < 0) { throw new IOException("File size is negative!"); if (offset + len > source.length) { len = source.length - offset; FileOutputStream fos = null; try { ... |
void | writeBytes(File filename, byte[] contents) Write out a file to the File specified. FileOutputStream out = new FileOutputStream(filename);
out.write(contents);
out.flush();
out.close();
|
void | writeBytes(File outputFile, byte[] bytes) write Bytes outputFile.getParentFile().mkdirs(); FileOutputStream outputStream = new FileOutputStream(outputFile); try { outputStream.write(bytes); } finally { outputStream.close(); |
void | writeBytes(final File file, final byte[] bytes) Writes bytes to the specified file try (final ByteArrayInputStream input = new ByteArrayInputStream(bytes); final FileOutputStream output = new FileOutputStream(file)) { copy(input, output); |
void | writeBytes(final File file, final byte[] bytes) Writes bytes to a file. FileOutputStream stream; stream = new FileOutputStream(file); try { stream.write(bytes); } finally { stream.close(); |