How to use the Guava Splitter and Joiner to convert to and from collections and Strings.
Search Results for: output
Filtering and Transforming Collections in Guava
Filter collections with Predicates and transform them with Functions using the Guava library.
Java – Write to File
The many ways to write data to File using Java.
Apache HttpClient Connection Management
How to open, manage and close connections with the Apache HttpClient 4.
Java – Create a File
How to create a File in Java using JDK 6, JDK 7 with NIO or Commons IO.
Java – Write an InputStream to a File
How to write an InputStream to a File – using Java, Guava and the Commons IO library.
Java InputStream to Byte Array and ByteBuffer
How to convert an InputStream to a byte[] using plain Java, Guava or Commons IO.
Jackson – Custom Serializer
Control your JSON output with Jackson 2 by using a Custom Serializer.
Java InputStream to String
How to convert an InputStream to a String using plain Java, Guava or Commons IO.
How To Serialize and Deserialize Enums with Jackson
How to serialize and deserialize an Enum as a JSON Object using Jackson 2.
Ignore Null Fields with Jackson
Ignore null fields with Jackson 2 – either globally, per class or even per field.
Jackson – Change Name of Field
Jackson – Change the name of a field to adhere to a specific JSON format.
Serialize Only Fields That Meet a Custom Criteria With Jackson
Only serialize fields that meet your custom criteria using Jackson 2.
Jackson Ignore Properties on Marshalling
Control your JSON Output – Ignore certain fields directly, by name or by type (with mixins) for Jackson bliss.
Error Handling for REST with Spring
Exception Handling for a REST API – illustrate the new Spring recommended approach and earlier solutions.
HttpSessionListener Example – Monitoring
Set up a HttpSessionListener to track the number of active sessions in a web application.
Maven Release to Nexus
Maven Release to Nexus – defining the repository in the pom, using the nexus release plugin, and the Release Process breakdown.
ETags for REST with Spring
ETags with the Spring – ShallowEtagHeaderFilter, integration testing of the REST API, and consumption scenarios with curl.
REST Pagination in Spring
Pagination in a Spring REST Service – URI structure and best practice, Page as Resource vs Page as Representation.