Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
From Print the content of a text file to the console. I used it to print a logo.
try {
// draw logo to console
InputStream input = new BufferedInputStream(new FileInputStream("src/main/resources/logo.txt"));
byte[] buffer = new byte[8192];
try {
for (int length = 0; (length = != -1;) {
System.out.write(buffer, 0, length);
} finally {
} catch (IOException e) {
logger.warn("Failed to draw logo file: " + e.getMessage());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment