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
ConstructorsConstructorDescriptionQcow2InputStream(InputStream sourceStream) Qcow2InputStream(InputStream sourceStream, boolean cacheHeaderBytes) -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()voidconsume()byte[]intread()intread(byte[] buffer) intread(byte[] b, int off, int len) voidsetClusterCache(byte[] clusterCache) voidsetCurrentCluster(Long currentCluster) voidvoidsetPosition(Long position) voidsetQcowHeader(QcowHeader qcowHeader) voidsetSourceStream(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:
readin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
consume
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
getSourceStream
-
setSourceStream
-
getQcowHeader
-
setQcowHeader
-
getPosition
-
setPosition
-
getOffset
-
setOffset
-
getCurrentCluster
-
setCurrentCluster
-
getClusterCache
public byte[] getClusterCache() -
setClusterCache
public void setClusterCache(byte[] clusterCache)
-