Java SE 7
byte[] bytes = { 0x48, 0x65, 0x6c, 0x6c, 0x6f };
try(FileOutputStream stream = new FileOutputStream("Hello world.txt")) {
stream.write(bytes);
} catch (IOException ioe) {
// Handle I/O Exception
ioe.printStackTrace();
}
Java SE 7
byte[] bytes = { 0x48, ...