Explore multiple Java methods, including the URI class, Path class, FilenameUtils, and regular expressions, providing diverse approaches to extract the last path segment from a URI.
Search Results for: java.nio
Serialization with FlatBuffers in Java
Explore the FlatBuffers library and its capabilities to serialize and deserialize complex data.
UTF-8 Validation in Java
Explore UTF-8 encoded bytes and string conversion and different types of UTF-8 validation based on byte and stream.
Create a “Mutable” String in Java
Learn about mutable Strings and ways of mutating a String.
Convert File to Byte Array in Java
Learn how to convert a file into a byte array in Java.
Converting Relative to Absolute Paths in Java
Learn how to quickly convert from relative to absolute paths in Java.
Check if a File Is Empty in Java
Explore a few efficient and straightforward ways to check if a file is empty in Java.
Combining Two or More Byte Arrays
Explore multiple ways to concatenate two or more byte arrays.
External Debugging With JMXTerm
Learn how to use JMXTerm to perform external debugging on a Java application.
Writing a List of Strings Into a Text File
A quick and practical guide to writing a List of Strings into a text file.
Getting the Filename From a String Containing an Absolute File Path
Learn how to extract the filename from an absolute path using core Java and Apache Commons.
Constructing a Relative Path From Two Absolute Paths in Java
Learn how to construct a relative path from two absolute paths in Java.
What Is the Difference Between NIO and NIO.2?
Understand Java IO functionalities and how they changed throughout different Java versions.
Convert a ByteBuffer to String in Java
A quick and practical guide to ByteBuffer -> String conversion in Java.
What Is the –release Option in the Java 9 Compiler?
Learn about Java 9’s new command-line compiler option –release, what it does and how to use it.
Convert a Byte Array to a Numeric Representation in Java
Explore different approaches to convert a byte array to a numeric value and vice versa in Java.
Java – Path vs File
Learn about the differences between the File and Path classes in Java.
Writing byte[] to a File in Java
When we need to write an array of bytes to a file in Java, there are a few options. We can use either the built-in APIs or a few common libraries.
Find the Last Modified File in a Directory with Java
Learn about file access management in Java
Copy a Directory in Java
Learn how to copy a directory using core Java features and third-party libraries