org.kie.commons.io.impl
public abstract class AbstractIOService extends Object implements IOService
IOService.NewFileSystemListener
Modifier and Type | Field and Description |
---|---|
static FileSystemType |
DEFAULT_FS_TYPE |
protected Map<FileSystemType,List<FileSystem>> |
fileSystems |
protected IOService.NewFileSystemListener |
newFileSystemListener |
protected static Charset |
UTF_8 |
EMPTY_OPTIONS
Constructor and Description |
---|
AbstractIOService() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy, createDirectories, createDirectory, delete, deleteIfExists, endBatch, getAttribute, getFileAttributeView, move, newByteChannel, readAttributes, setAttribute, setAttributes, startBatch
protected static final Charset UTF_8
public static final FileSystemType DEFAULT_FS_TYPE
protected final Map<FileSystemType,List<FileSystem>> fileSystems
protected IOService.NewFileSystemListener newFileSystemListener
public Path get(String first, String... more) throws IllegalArgumentException
get
in interface IOService
IllegalArgumentException
public Path get(URI uri) throws IllegalArgumentException, FileSystemNotFoundException, SecurityException
get
in interface IOService
IllegalArgumentException
FileSystemNotFoundException
SecurityException
public Iterable<FileSystem> getFileSystems()
getFileSystems
in interface IOService
public List<FileSystem> getFileSystems(FileSystemType type)
getFileSystems
in interface IOService
public FileSystem getFileSystem(URI uri)
getFileSystem
in interface IOService
public FileSystem newFileSystem(URI uri, Map<String,?> env) throws IllegalArgumentException, FileSystemAlreadyExistsException, ProviderNotFoundException, org.kie.commons.java.nio.IOException, SecurityException
newFileSystem
in interface IOService
IllegalArgumentException
FileSystemAlreadyExistsException
ProviderNotFoundException
org.kie.commons.java.nio.IOException
SecurityException
public FileSystem newFileSystem(URI uri, Map<String,?> env, FileSystemType type) throws IllegalArgumentException, FileSystemAlreadyExistsException, ProviderNotFoundException, org.kie.commons.java.nio.IOException, SecurityException
newFileSystem
in interface IOService
IllegalArgumentException
FileSystemAlreadyExistsException
ProviderNotFoundException
org.kie.commons.java.nio.IOException
SecurityException
public void onNewFileSystem(IOService.NewFileSystemListener listener)
onNewFileSystem
in interface IOService
public InputStream newInputStream(Path path, OpenOption... options) throws IllegalArgumentException, NoSuchFileException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
newInputStream
in interface IOService
IllegalArgumentException
NoSuchFileException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public DirectoryStream<Path> newDirectoryStream(Path dir) throws IllegalArgumentException, NotDirectoryException, org.kie.commons.java.nio.IOException, SecurityException
newDirectoryStream
in interface IOService
IllegalArgumentException
NotDirectoryException
org.kie.commons.java.nio.IOException
SecurityException
public DirectoryStream<Path> newDirectoryStream(Path dir, DirectoryStream.Filter<Path> filter) throws IllegalArgumentException, NotDirectoryException, org.kie.commons.java.nio.IOException, SecurityException
newDirectoryStream
in interface IOService
IllegalArgumentException
NotDirectoryException
org.kie.commons.java.nio.IOException
SecurityException
public OutputStream newOutputStream(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
newOutputStream
in interface IOService
IllegalArgumentException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public org.kie.commons.java.nio.channels.SeekableByteChannel newByteChannel(Path path, OpenOption... options) throws IllegalArgumentException, UnsupportedOperationException, FileAlreadyExistsException, org.kie.commons.java.nio.IOException, SecurityException
newByteChannel
in interface IOService
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
org.kie.commons.java.nio.IOException
SecurityException
public Path createDirectory(Path dir, Map<String,?> attrs) throws IllegalArgumentException, UnsupportedOperationException, FileAlreadyExistsException, org.kie.commons.java.nio.IOException, SecurityException
createDirectory
in interface IOService
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
org.kie.commons.java.nio.IOException
SecurityException
public Path createDirectories(Path dir, Map<String,?> attrs) throws UnsupportedOperationException, FileAlreadyExistsException, org.kie.commons.java.nio.IOException, SecurityException
createDirectories
in interface IOService
UnsupportedOperationException
FileAlreadyExistsException
org.kie.commons.java.nio.IOException
SecurityException
public Path createTempFile(String prefix, String suffix, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
createTempFile
in interface IOService
IllegalArgumentException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public Path createTempFile(Path dir, String prefix, String suffix, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
createTempFile
in interface IOService
IllegalArgumentException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public Path createTempDirectory(String prefix, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
createTempDirectory
in interface IOService
IllegalArgumentException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public Path createTempDirectory(Path dir, String prefix, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, org.kie.commons.java.nio.IOException, SecurityException
createTempDirectory
in interface IOService
IllegalArgumentException
UnsupportedOperationException
org.kie.commons.java.nio.IOException
SecurityException
public org.kie.commons.java.nio.file.attribute.FileTime getLastModifiedTime(Path path) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, SecurityException
getLastModifiedTime
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
SecurityException
public Map<String,Object> readAttributes(Path path) throws UnsupportedOperationException, NoSuchFileException, IllegalArgumentException, org.kie.commons.java.nio.IOException, SecurityException
readAttributes
in interface IOService
UnsupportedOperationException
NoSuchFileException
IllegalArgumentException
org.kie.commons.java.nio.IOException
SecurityException
public Path setAttributes(Path path, Map<String,Object> attrs) throws UnsupportedOperationException, IllegalArgumentException, ClassCastException, org.kie.commons.java.nio.IOException, SecurityException
setAttributes
in interface IOService
UnsupportedOperationException
IllegalArgumentException
ClassCastException
org.kie.commons.java.nio.IOException
SecurityException
public long size(Path path) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, SecurityException
size
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
SecurityException
public boolean exists(Path path) throws IllegalArgumentException, SecurityException
exists
in interface IOService
IllegalArgumentException
SecurityException
public boolean notExists(Path path) throws IllegalArgumentException, SecurityException
notExists
in interface IOService
IllegalArgumentException
SecurityException
public boolean isSameFile(Path path, Path path2) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, SecurityException
isSameFile
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
SecurityException
public Path createFile(Path path, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, UnsupportedOperationException, FileAlreadyExistsException, org.kie.commons.java.nio.IOException, SecurityException
createFile
in interface IOService
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
org.kie.commons.java.nio.IOException
SecurityException
public BufferedReader newBufferedReader(Path path, Charset cs) throws IllegalArgumentException, NoSuchFileException, org.kie.commons.java.nio.IOException, SecurityException
newBufferedReader
in interface IOService
IllegalArgumentException
NoSuchFileException
org.kie.commons.java.nio.IOException
SecurityException
public long copy(Path source, OutputStream out) throws org.kie.commons.java.nio.IOException, SecurityException
copy
in interface IOService
org.kie.commons.java.nio.IOException
SecurityException
public byte[] readAllBytes(Path path) throws org.kie.commons.java.nio.IOException, OutOfMemoryError, SecurityException
readAllBytes
in interface IOService
org.kie.commons.java.nio.IOException
OutOfMemoryError
SecurityException
public List<String> readAllLines(Path path) throws IllegalArgumentException, NoSuchFileException, org.kie.commons.java.nio.IOException, SecurityException
readAllLines
in interface IOService
IllegalArgumentException
NoSuchFileException
org.kie.commons.java.nio.IOException
SecurityException
public List<String> readAllLines(Path path, Charset cs) throws IllegalArgumentException, NoSuchFileException, org.kie.commons.java.nio.IOException, SecurityException
readAllLines
in interface IOService
IllegalArgumentException
NoSuchFileException
org.kie.commons.java.nio.IOException
SecurityException
public String readAllString(Path path, Charset cs) throws IllegalArgumentException, NoSuchFileException, org.kie.commons.java.nio.IOException
readAllString
in interface IOService
IllegalArgumentException
NoSuchFileException
org.kie.commons.java.nio.IOException
public String readAllString(Path path) throws IllegalArgumentException, NoSuchFileException, org.kie.commons.java.nio.IOException
readAllString
in interface IOService
IllegalArgumentException
NoSuchFileException
org.kie.commons.java.nio.IOException
public BufferedWriter newBufferedWriter(Path path, Charset cs, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException, SecurityException
newBufferedWriter
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
SecurityException
public long copy(InputStream in, Path target, CopyOption... options) throws org.kie.commons.java.nio.IOException, FileAlreadyExistsException, DirectoryNotEmptyException, UnsupportedOperationException, SecurityException
copy
in interface IOService
org.kie.commons.java.nio.IOException
FileAlreadyExistsException
DirectoryNotEmptyException
UnsupportedOperationException
SecurityException
public Path write(Path path, byte[] bytes, OpenOption... options) throws org.kie.commons.java.nio.IOException, UnsupportedOperationException, SecurityException
write
in interface IOService
org.kie.commons.java.nio.IOException
UnsupportedOperationException
SecurityException
public Path write(Path path, Iterable<? extends CharSequence> lines, Charset cs, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException, SecurityException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
SecurityException
public Path write(Path path, String content, Charset cs, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public Path write(Path path, String content, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public Path write(Path path, String content, Map<String,?> attrs, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public Path write(Path path, String content, Charset cs, Map<String,?> attrs, OpenOption... options) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public org.kie.commons.java.nio.file.attribute.FileAttribute<?>[] convert(Map<String,?> attrs)
public Path write(Path path, byte[] bytes, Map<String,?> attrs, OpenOption... options) throws org.kie.commons.java.nio.IOException, UnsupportedOperationException, SecurityException
write
in interface IOService
org.kie.commons.java.nio.IOException
UnsupportedOperationException
SecurityException
public Path write(Path path, String content, Set<? extends OpenOption> options, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public Path write(Path path, String content, Charset cs, Set<? extends OpenOption> options, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
public Path write(Path path, byte[] bytes, Set<? extends OpenOption> options, org.kie.commons.java.nio.file.attribute.FileAttribute<?>... attrs) throws IllegalArgumentException, org.kie.commons.java.nio.IOException, UnsupportedOperationException
write
in interface IOService
IllegalArgumentException
org.kie.commons.java.nio.IOException
UnsupportedOperationException
protected abstract Set<? extends OpenOption> buildOptions(Set<? extends OpenOption> options, OpenOption... other)
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.