Explore several approaches for writing strings to an OutputStream in Java.
Search Results for: output
Convert an OutputStream to a Byte Array in Java
Learn how to read bytes that were already written to an OutputStream.
How to Center Text Output in Java
Learn multiple ways to center text output in Java: String formatting, StringBuilder, and StringUtils from the Apache Commons Lang libraries.
Write Console Output to Text File in Java
Lern how to make System.out.println() print data to a file by replacing the default System.out
Convert an OutputStream to an InputStream
Explore two approaches to converting an OutputStream to an InputStream: using a byte array and a pipe.
Easy Ways to Write a Java InputStream to an OutputStream
Learn how to write a Java InputStream to a Java OutputStream.
Filtering Jackson JSON Output Based on Spring Security Role
Learn how to filter JSON output in a web application based on a Spring Security role.
Formatting Output with printf() in Java
Learn how to format output using Java’s PrintStream.printf() method
Guide to Java OutputStream
Learn about the Java OutputStream’s interfaces and common methods
Using Guava CountingOutputStream
Learn how to use Guava’s CountingOutputStream class
Get Log Output in JSON
Learn how output JSON using the two most popular logging libraries, Jog4j2 and Logback.
Finding the nth Last Occurrence of char in String
Explore different methods to find the nth last occurrence of a character within a string using Java.
How to Fix EOFException in Java
In this quick tutorial, we learn how to fix the java.io.EOFException, a special type of IOException.
Implement Update-Or-Insert in Spring Data JPA
Learn different approaches to performing update-or-insert operations using Spring Data JPA.
Compress and Create a Byte Array Using GZip
Learn how to get the compressed data in a byte array when using the GZIP file format.
Different Ways to Use Limit and Skip in MongoRepository
Explore the skip and limit functionalities within MongoRepository.
PrintWriter write() vs print() Method in Java
Discover the differences between PrintWriter’s write() and print() methods.
Introduction to DuckDB
Learn about the advantages of the DuckDB database and some fundamental operations via illustrative examples
Code Coverage vs. Test Coverage
A quick tutorial on the differences between code coverage and test coverage.
Get the Response Body in Spring Boot Filter
Learn to retrieve the response body from a ServletResponse in a Spring Boot filter.