Top "Java-io" questions

The java.

How to get the current working directory in Java?

I want to access my current working directory using java. My code : String current = new java.io.File( "." ).getCanonicalPath(); System.…

java java-io
Getting java.net.SocketTimeoutException: Connection timed out in android

I'm relatively new to android development. I'm developing an android application where i'm sending request to web server and parsing …

java android httpurlconnection java-io
Create a directory if it does not exist and then create the files in that directory as well

Condition is if directory exists it has to create files in that specific directory with out creating a new directory. …

java java-io
How to get just the parent directory name of a specific file

How to get ddd from the path name where the test.java resides. File file = new File("C:/aaa/bbb/…

java groovy java-io
Reading a simple text file

I am trying to read a simple text file in my sample Android Application. I am using the below written …

android text-files java-io
How to list the files inside a JAR file?

I have this code which reads all the files from a directory. File textFolder = new File("text_directory"); File [] texFiles = …

java file jar java-io getresource
implements Closeable or implements AutoCloseable

I'm in the process of learning Java and I cannot find any good explanation on the implements Closeable and the …

java java-io
how to File.listFiles in alphabetical order?

I've got code as below: class ListPageXMLFiles implements FileFilter { @Override public boolean accept(File pathname) { DebugLog.i("ListPageXMLFiles", "pathname is " + …

java java-io
Java difference between FileWriter and BufferedWriter

What's the difference between those? I'm just learning Java ATM, but it seems like I can write to a file …

java file-io java-io
Java InputStream blocking read

According to the java api, the InputStream.read() is described as: If no byte is available because the end of …

java blocking inputstream rxtx java-io