Top "Nio" questions

NIO is Java 'New I/O' introduced in 1.4, providing non-blocking and multiplexed network I/O; 'direct' (native) buffers; file locks and mapped files; and character set codecs.

Recursively list files in Java

How do I recursively list all files under a directory in Java? Does the framework provide any utility? I saw …

java file recursion java-7 nio
Create a Path from String in Java7

How can I create a java.nio.file.Path object from a String object in Java 7? I.e. String textPath = "…

string path nio java-7
Java NIO: What does IOException: Broken pipe mean?

For some of my Java NIO connections, when I have a SocketChannel.write(ByteBuffer) call, it throws an IOException: "Broken …

java nio
Java: Converting String to and from ByteBuffer and associated problems

I am using Java NIO for my socket connections, and my protocol is text based, so I need to be …

java string character-encoding nio bytebuffer
Gets byte array from a ByteBuffer in java

Is this the recommended way to get the bytes from the ByteBuffer ByteBuffer bb =.. byte[] b = new byte[bb.remaining()] …

java arrays bytearray nio bytebuffer
Java NIO FileChannel versus FileOutputstream performance / usefulness

I am trying to figure out if there is any difference in performance (or advantages) when we use nio FileChannel …

java optimization file nio operations
TCP: Server sends [RST, ACK] immediately after receiving [SYN] from Client

Host_A tries to send some data to Host_B over TCP. Host_B is listening on port 8181. Both Host_…

linux tcp nio redhat
Recursively list all files within a directory using nio.file.DirectoryStream;

I want to list all the FILES within the specified directory and subdirectories within that directory. No directories should be …

java file nio directorystream
Best way to write String to file using java nio

I need to write(append) huge string to flat file using java nio. The encoding is ISO-8859-1. Currently we …

java file-io character-encoding nio
Java: Path vs File

For new applications written in Java 7, is there any reason to use a java.io.File object any more or …

java file-io path nio