Package com.morpheusdata.core.util.image
Class Qcow2InputStream
java.lang.Object
java.io.InputStream
com.morpheusdata.core.util.image.Qcow2InputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Created by davidestes on 4/11/16.
-
Constructor Summary
ConstructorDescriptionQcow2InputStream
(InputStream sourceStream) Qcow2InputStream
(InputStream sourceStream, boolean cacheHeaderBytes) -
Method Summary
Modifier and TypeMethodDescriptionint
void
close()
void
consume()
byte[]
int
read()
int
read
(byte[] buffer) int
read
(byte[] b, int off, int len) void
setClusterCache
(byte[] clusterCache) void
setCurrentCluster
(Long currentCluster) void
void
setPosition
(Long position) void
setQcowHeader
(QcowHeader qcowHeader) void
setSourceStream
(InputStream sourceStream) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
Qcow2InputStream
public Qcow2InputStream(InputStream sourceStream, boolean cacheHeaderBytes) throws IllegalArgumentException, IllegalStateException, IOException -
Qcow2InputStream
public Qcow2InputStream(InputStream sourceStream) throws IllegalArgumentException, IllegalStateException, IOException
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
consume
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
getSourceStream
-
setSourceStream
-
getQcowHeader
-
setQcowHeader
-
getPosition
-
setPosition
-
getOffset
-
setOffset
-
getCurrentCluster
-
setCurrentCluster
-
getClusterCache
public byte[] getClusterCache() -
setClusterCache
public void setClusterCache(byte[] clusterCache)
-