Interface FdResource
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FdResource.FdResourceInputStream, FdResource.FdResourceOutputStream, FdResource.FdResourcePath
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptiondefault InputStreamdefault OutputStreamTry to cast the file description to one backed by a path.voidclose()static FdResourceof(InputStream is) static FdResourceof(OutputStream os) static FdResourcestatic FdResourcestatic FdResource
-
Method Details
-
asInputStream
-
asOutputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
castAsFdPath
Try to cast the file description to one backed by a path. Returns null if this is not the case. Only attempts a cast - reference counts remain unaffected. -
openRead
static FdResource.FdResourceInputStream openRead(FileDescription<FdResource.FdResourcePath> fd) throws IOException - Throws:
IOException
-
openWrite
- Throws:
IOException
-
openAppend
- Throws:
IOException
-
of
-
of
-
of
-