nio2 Questions

1

Solved

I am writing a cross-platform application that creates temporary files and copies these to another location, where they need to be readable by everyone. (By default, only the owner has read access ...
Bukhara asked 4/2, 2014 at 1:41

2

Solved

I don't know where to seek clarifications and confirmations on Java API documentation and Java code, so I'm doing it here. In the API documentation for FileChannel, I'm finding off-by-one errors w...
Grammer asked 1/12, 2013 at 5:48

1

Solved

I see a lot of examples that use Files.walkFileTree() to copy a directory and its contents from one location to another, but they fail to take the directory's file attributes and permissions into c...
Apposite asked 14/7, 2013 at 17:16

2

Solved

I'm writing a program which needs to determine files/directories last modified time. I want to handle this time using Joda Time, and I'm using Java 7 NIO.2 class Files to get file last modified tim...
Tena asked 26/8, 2013 at 6:23

2

Solved

I'm doing some research on Java NIO.2 and its file operations, and currently I'm playing with filetree-walking functions and classes. NIO.2 FileVisitor API is wonderful, it's a shame that such thi...
Tridimensional asked 6/5, 2013 at 20:12

2

Solved

I'm trying to find an easy way to map a URI to a Path without writing code specific to any particular file system. The following seems to work but requires a questionable technique: public void pr...
Preamplifier asked 4/3, 2013 at 6:35

2

Solved

I'm trying to create 300M files from a java program, I switched from the old file API to the new java 7 nio package, but the new package is going even slower than the old one. I see less CPU utili...
Beldam asked 15/3, 2013 at 13:34

1

Solved

I have some file I/0 traversal code written in Java 6, trying to move it the New I/O in Java 7 but I cannot find any replacement for this kind of stuff. File[] files = dir.listFiles(AudioFileFilte...
Holp asked 15/2, 2013 at 10:58

1

Solved

Im using Files.WalkFileTree() to navigate folder and counting audio files, but there is a problem when it encounters a tar file, it seems to be treating it as an actual folder I was expecting it to...
Swell asked 21/1, 2013 at 9:50

3

Solved

Using Java 1.6 Filepath can be entered by user and then I apply various regular expressions to remove characters that are invalid for the platform (such as '?' is invalid on Windows), and check pat...
Gram asked 9/10, 2012 at 17:2

2

I'm tryting to learn the nio 2 package in Java 7 and i stumbled upon the Files.readAllLines(Path p, Charset cs) method. I find it very useful, but i'm of the opinion that there should be a ve...
Frodeen asked 3/10, 2012 at 9:2

2

I'm encountering a recurrent issue in an application that tracks content of files within a directory, based on the Java 7 WatchService API. When the underlying file system fires a modification even...
Thermo asked 10/1, 2012 at 11:21

4

Solved

I am interested in using some of the NIO2 features in the Java 7 SDK if available (specifically, the file system watchers), however I do not want to compile my classes for Java 7 and exclude Java 6...
Dismissal asked 29/9, 2011 at 14:24

© 2022 - 2024 — McMap. All rights reserved.