org.kie.commons.io
Interface IOService
- All Known Implementing Classes:
- AbstractIOService, IOServiceClusterImpl, IOServiceDotFileImpl, IOServiceNio2WrapperImpl
public interface IOService
|
Method Summary |
FileAttribute<?>[] |
convert(Map<String,?> attrs)
|
long |
copy(InputStream in,
Path target,
CopyOption... options)
|
long |
copy(Path source,
OutputStream out)
|
Path |
copy(Path source,
Path target,
CopyOption... options)
|
Path |
createDirectories(Path dir,
FileAttribute<?>... attrs)
|
Path |
createDirectories(Path dir,
Map<String,?> attrs)
|
Path |
createDirectory(Path dir,
FileAttribute<?>... attrs)
|
Path |
createDirectory(Path dir,
Map<String,?> attrs)
|
Path |
createFile(Path path,
FileAttribute<?>... attrs)
|
Path |
createTempDirectory(Path dir,
String prefix,
FileAttribute<?>... attrs)
|
Path |
createTempDirectory(String prefix,
FileAttribute<?>... attrs)
|
Path |
createTempFile(Path dir,
String prefix,
String suffix,
FileAttribute<?>... attrs)
|
Path |
createTempFile(String prefix,
String suffix,
FileAttribute<?>... attrs)
|
void |
delete(Path path)
|
boolean |
deleteIfExists(Path path)
|
void |
endBatch()
|
boolean |
exists(Path path)
|
Path |
get(String first,
String... more)
|
Path |
get(URI uri)
|
Object |
getAttribute(Path path,
String attribute)
|
|
getFileAttributeView(Path path,
Class<V> type)
|
FileSystem |
getFileSystem(URI uri)
|
Iterable<FileSystem> |
getFileSystems()
|
Iterable<FileSystem> |
getFileSystems(FileSystemType type)
|
FileTime |
getLastModifiedTime(Path path)
|
boolean |
isSameFile(Path path,
Path path2)
|
Path |
move(Path source,
Path target,
CopyOption... options)
|
BufferedReader |
newBufferedReader(Path path,
Charset cs)
|
BufferedWriter |
newBufferedWriter(Path path,
Charset cs,
OpenOption... options)
|
SeekableByteChannel |
newByteChannel(Path path,
OpenOption... options)
|
SeekableByteChannel |
newByteChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
DirectoryStream<Path> |
newDirectoryStream(Path dir)
|
DirectoryStream<Path> |
newDirectoryStream(Path dir,
DirectoryStream.Filter<Path> filter)
|
FileSystem |
newFileSystem(URI uri,
Map<String,?> env)
|
FileSystem |
newFileSystem(URI uri,
Map<String,?> env,
FileSystemType type)
|
InputStream |
newInputStream(Path path,
OpenOption... options)
|
OutputStream |
newOutputStream(Path path,
OpenOption... options)
|
boolean |
notExists(Path path)
|
void |
onNewFileSystem(IOService.NewFileSystemListener listener)
|
byte[] |
readAllBytes(Path path)
|
List<String> |
readAllLines(Path path)
|
List<String> |
readAllLines(Path path,
Charset cs)
|
String |
readAllString(Path path)
|
String |
readAllString(Path path,
Charset cs)
|
Map<String,Object> |
readAttributes(Path path)
|
Map<String,Object> |
readAttributes(Path path,
String attributes)
|
Path |
setAttribute(Path path,
String attribute,
Object value)
|
Path |
setAttributes(Path path,
FileAttribute<?>... attrs)
|
Path |
setAttributes(Path path,
Map<String,Object> attrs)
|
long |
size(Path path)
|
void |
startBatch()
|
Path |
write(Path path,
byte[] bytes,
Map<String,?> attrs,
OpenOption... options)
|
Path |
write(Path path,
byte[] bytes,
OpenOption... options)
|
Path |
write(Path path,
byte[] bytes,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
Path |
write(Path path,
Iterable<? extends CharSequence> lines,
Charset cs,
OpenOption... options)
|
Path |
write(Path path,
String content,
Charset cs,
Map<String,?> attrs,
OpenOption... options)
|
Path |
write(Path path,
String content,
Charset cs,
OpenOption... options)
|
Path |
write(Path path,
String content,
Charset cs,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
Path |
write(Path path,
String content,
Map<String,?> attrs,
OpenOption... options)
|
Path |
write(Path path,
String content,
OpenOption... options)
|
Path |
write(Path path,
String content,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
EMPTY_OPTIONS
static final Set<OpenOption> EMPTY_OPTIONS
startBatch
void startBatch()
endBatch
void endBatch()
convert
FileAttribute<?>[] convert(Map<String,?> attrs)
get
Path get(String first,
String... more)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
get
Path get(URI uri)
throws IllegalArgumentException,
FileSystemNotFoundException,
SecurityException
- Throws:
IllegalArgumentException
FileSystemNotFoundException
SecurityException
getFileSystems
Iterable<FileSystem> getFileSystems()
getFileSystems
Iterable<FileSystem> getFileSystems(FileSystemType type)
getFileSystem
FileSystem getFileSystem(URI uri)
throws IllegalArgumentException,
FileSystemNotFoundException,
ProviderNotFoundException,
SecurityException
- Throws:
IllegalArgumentException
FileSystemNotFoundException
ProviderNotFoundException
SecurityException
newFileSystem
FileSystem newFileSystem(URI uri,
Map<String,?> env)
throws IllegalArgumentException,
FileSystemAlreadyExistsException,
ProviderNotFoundException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
FileSystemAlreadyExistsException
ProviderNotFoundException
IOException
SecurityException
newFileSystem
FileSystem newFileSystem(URI uri,
Map<String,?> env,
FileSystemType type)
throws IllegalArgumentException,
FileSystemAlreadyExistsException,
ProviderNotFoundException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
FileSystemAlreadyExistsException
ProviderNotFoundException
IOException
SecurityException
onNewFileSystem
void onNewFileSystem(IOService.NewFileSystemListener listener)
newInputStream
InputStream newInputStream(Path path,
OpenOption... options)
throws IllegalArgumentException,
NoSuchFileException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NoSuchFileException
UnsupportedOperationException
IOException
SecurityException
newOutputStream
OutputStream newOutputStream(Path path,
OpenOption... options)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
newByteChannel
SeekableByteChannel newByteChannel(Path path,
OpenOption... options)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
newByteChannel
SeekableByteChannel newByteChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
newDirectoryStream
DirectoryStream<Path> newDirectoryStream(Path dir)
throws IllegalArgumentException,
NotDirectoryException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NotDirectoryException
IOException
SecurityException
newDirectoryStream
DirectoryStream<Path> newDirectoryStream(Path dir,
DirectoryStream.Filter<Path> filter)
throws IllegalArgumentException,
NotDirectoryException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NotDirectoryException
IOException
SecurityException
createFile
Path createFile(Path path,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createDirectory
Path createDirectory(Path dir,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createDirectories
Path createDirectories(Path dir,
FileAttribute<?>... attrs)
throws UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createDirectory
Path createDirectory(Path dir,
Map<String,?> attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createDirectories
Path createDirectories(Path dir,
Map<String,?> attrs)
throws UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
delete
void delete(Path path)
throws IllegalArgumentException,
NoSuchFileException,
DirectoryNotEmptyException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NoSuchFileException
DirectoryNotEmptyException
IOException
SecurityException
deleteIfExists
boolean deleteIfExists(Path path)
throws IllegalArgumentException,
DirectoryNotEmptyException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
DirectoryNotEmptyException
IOException
SecurityException
createTempFile
Path createTempFile(String prefix,
String suffix,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
createTempFile
Path createTempFile(Path dir,
String prefix,
String suffix,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
createTempDirectory
Path createTempDirectory(String prefix,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
createTempDirectory
Path createTempDirectory(Path dir,
String prefix,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
copy
Path copy(Path source,
Path target,
CopyOption... options)
throws UnsupportedOperationException,
FileAlreadyExistsException,
DirectoryNotEmptyException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
DirectoryNotEmptyException
IOException
SecurityException
move
Path move(Path source,
Path target,
CopyOption... options)
throws UnsupportedOperationException,
FileAlreadyExistsException,
DirectoryNotEmptyException,
AtomicMoveNotSupportedException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
DirectoryNotEmptyException
AtomicMoveNotSupportedException
IOException
SecurityException
getFileAttributeView
<V extends FileAttributeView> V getFileAttributeView(Path path,
Class<V> type)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
readAttributes
Map<String,Object> readAttributes(Path path)
throws UnsupportedOperationException,
NoSuchFileException,
IllegalArgumentException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
NoSuchFileException
IllegalArgumentException
IOException
SecurityException
readAttributes
Map<String,Object> readAttributes(Path path,
String attributes)
throws UnsupportedOperationException,
NoSuchFileException,
IllegalArgumentException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
NoSuchFileException
IllegalArgumentException
IOException
SecurityException
setAttributes
Path setAttributes(Path path,
FileAttribute<?>... attrs)
throws UnsupportedOperationException,
IllegalArgumentException,
ClassCastException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
IllegalArgumentException
ClassCastException
IOException
SecurityException
setAttributes
Path setAttributes(Path path,
Map<String,Object> attrs)
throws UnsupportedOperationException,
IllegalArgumentException,
ClassCastException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
IllegalArgumentException
ClassCastException
IOException
SecurityException
setAttribute
Path setAttribute(Path path,
String attribute,
Object value)
throws UnsupportedOperationException,
IllegalArgumentException,
ClassCastException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
IllegalArgumentException
ClassCastException
IOException
SecurityException
getAttribute
Object getAttribute(Path path,
String attribute)
throws UnsupportedOperationException,
IllegalArgumentException,
IOException,
SecurityException
- Throws:
UnsupportedOperationException
IllegalArgumentException
IOException
SecurityException
getLastModifiedTime
FileTime getLastModifiedTime(Path path)
throws IllegalArgumentException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
IOException
SecurityException
size
long size(Path path)
throws IllegalArgumentException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
IOException
SecurityException
exists
boolean exists(Path path)
throws IllegalArgumentException,
SecurityException
- Throws:
IllegalArgumentException
SecurityException
notExists
boolean notExists(Path path)
throws IllegalArgumentException,
SecurityException
- Throws:
IllegalArgumentException
SecurityException
isSameFile
boolean isSameFile(Path path,
Path path2)
throws IllegalArgumentException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
IOException
SecurityException
newBufferedReader
BufferedReader newBufferedReader(Path path,
Charset cs)
throws IllegalArgumentException,
NoSuchFileException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NoSuchFileException
IOException
SecurityException
newBufferedWriter
BufferedWriter newBufferedWriter(Path path,
Charset cs,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException,
SecurityException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
SecurityException
copy
long copy(InputStream in,
Path target,
CopyOption... options)
throws IOException,
FileAlreadyExistsException,
DirectoryNotEmptyException,
UnsupportedOperationException,
SecurityException
- Throws:
IOException
FileAlreadyExistsException
DirectoryNotEmptyException
UnsupportedOperationException
SecurityException
copy
long copy(Path source,
OutputStream out)
throws IOException,
SecurityException
- Throws:
IOException
SecurityException
readAllBytes
byte[] readAllBytes(Path path)
throws IOException,
OutOfMemoryError,
SecurityException
- Throws:
IOException
OutOfMemoryError
SecurityException
readAllLines
List<String> readAllLines(Path path)
throws IllegalArgumentException,
NoSuchFileException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NoSuchFileException
IOException
SecurityException
readAllLines
List<String> readAllLines(Path path,
Charset cs)
throws IllegalArgumentException,
NoSuchFileException,
IOException,
SecurityException
- Throws:
IllegalArgumentException
NoSuchFileException
IOException
SecurityException
readAllString
String readAllString(Path path,
Charset cs)
throws IllegalArgumentException,
NoSuchFileException,
IOException
- Throws:
IllegalArgumentException
NoSuchFileException
IOException
readAllString
String readAllString(Path path)
throws IllegalArgumentException,
NoSuchFileException,
IOException
- Throws:
IllegalArgumentException
NoSuchFileException
IOException
write
Path write(Path path,
byte[] bytes,
OpenOption... options)
throws IOException,
UnsupportedOperationException,
SecurityException
- Throws:
IOException
UnsupportedOperationException
SecurityException
write
Path write(Path path,
byte[] bytes,
Map<String,?> attrs,
OpenOption... options)
throws IOException,
UnsupportedOperationException,
SecurityException
- Throws:
IOException
UnsupportedOperationException
SecurityException
write
Path write(Path path,
byte[] bytes,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
Iterable<? extends CharSequence> lines,
Charset cs,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException,
SecurityException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
SecurityException
write
Path write(Path path,
String content,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
String content,
Charset cs,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
String content,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
String content,
Charset cs,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
String content,
Map<String,?> attrs,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
write
Path write(Path path,
String content,
Charset cs,
Map<String,?> attrs,
OpenOption... options)
throws IllegalArgumentException,
IOException,
UnsupportedOperationException
- Throws:
IllegalArgumentException
IOException
UnsupportedOperationException
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.