Save a text file with no line breaks?
in
Programming Questions
•
24 days ago
I'm opening up a binary file, converting to 1's and 0's, then outputting as a text file. Problem is, it gives me a line break after each byte, bummer! Any way around this?
- // Open a file and read its binary data
byte b[] = loadBytes("whatever.dmg");
String[] lines = new String[b.length];
for (int i = 0; i < b.length; i++) {
lines[i] = binary(b[i]);
}
saveStrings("lines.txt", lines);
exit(); // Stop the program
1