0x0 is the value for null. You can print null to a file by doing this println(null);
I'm not sure that's right. As far as I know a PrintStream instance passed a variable or expression that evaluates to null will print the four letters "null" (which has the merit of being readable) and not the single letter 0x0.
Also "println(null);" is ambiguous, you would have to cast the null to something. (Eg a String.)
---
@OP: You are getting lines of the zero character because somewhere in the code you haven't posted you are telling the PrintStream instance to print them. You can do this, eg, by using the character literal '\0', or by using the same escape sequence inside a string literal:
String str = "\0\0";
System.out.println("The next line contains a couple of zero characters:");
System.out.println(str);
System.out.println(str.length());