Package cz.o2.proxima.direct.io.bulkfs
Interface Path
-
- All Superinterfaces:
java.lang.Comparable<Path>
,java.io.Serializable
- All Known Implementing Classes:
BlobPath
,GCloudBlobPath
,LocalPath
,S3BlobPath
@Internal public interface Path extends java.io.Serializable, java.lang.Comparable<Path>
Proxima's abstraction of path inFileSystem
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
delete()
Delete thisPath
.FileSystem
getFileSystem()
RetrieveFileSystem
of this Path.static LocalPath
local(FileSystem fs, java.io.File path)
Create a Path representation of the givenlocal file
.default java.nio.channels.ReadableByteChannel
read()
Open readable byte channel from a given Path.java.io.InputStream
reader()
Deprecated.Useread()
instead.static Path
stdin(FileFormat format)
default java.nio.channels.WritableByteChannel
write()
Open writeable byte channel to a given Path.java.io.OutputStream
writer()
Deprecated.Usewrite()
instead.
-
-
-
Method Detail
-
local
static LocalPath local(FileSystem fs, java.io.File path)
Create a Path representation of the givenlocal file
.- Parameters:
fs
- local filesystempath
- the local file- Returns:
- Path representation of this local file
-
stdin
static Path stdin(FileFormat format)
-
read
default java.nio.channels.ReadableByteChannel read() throws java.io.IOException
Open readable byte channel from a given Path.- Returns:
ReadableByteChannel
of thePath
.- Throws:
java.io.IOException
- on errors
-
reader
@Deprecated java.io.InputStream reader() throws java.io.IOException
Deprecated.Useread()
instead.Open input stream from given Path.- Returns:
InputStream
of thePath
.- Throws:
java.io.IOException
- on errors
-
write
default java.nio.channels.WritableByteChannel write() throws java.io.IOException
Open writeable byte channel to a given Path.- Returns:
WritableByteChannel
of thePath
.- Throws:
java.io.IOException
- on errors
-
writer
@Deprecated java.io.OutputStream writer() throws java.io.IOException
Deprecated.Usewrite()
instead.Open output stream to the Path.- Returns:
OutputStream
of thePath
- Throws:
java.io.IOException
- on errors *
-
getFileSystem
FileSystem getFileSystem()
RetrieveFileSystem
of this Path.- Returns:
FileSystem
associated with thePath
.
-
delete
void delete() throws java.io.IOException
Delete thisPath
.- Throws:
java.io.IOException
- on errors
-
-