- java.lang.Object
-
- io.github.mmm.binary.StreamablePath
-
- All Implemented Interfaces:
Streamable
public class StreamablePath extends Object implements Streamable
Implementation ofStreamable
forPath
.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description StreamablePath(Path file)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
asStream()
Path
getFile()
void
save(OutputStream out)
-
-
-
Constructor Detail
-
StreamablePath
public StreamablePath(Path file)
The constructor.- Parameters:
file
- the file to adapt.
-
-
Method Detail
-
save
public void save(OutputStream out)
- Specified by:
save
in interfaceStreamable
- Parameters:
out
- theOutputStream
towrite
the data to.
-
asStream
public InputStream asStream()
- Specified by:
asStream
in interfaceStreamable
- Returns:
- a new
InputStream
to read the underlying data.
-
-