java character for end of file

Java
String iHaveAnEof = "file ends here\u001a";

Source

Also in Java: