org.wso2.carbon.registry.core.jdbc.utils
Class VersionRetriever
java.lang.Object
org.wso2.carbon.registry.core.jdbc.utils.VersionRetriever
public class VersionRetriever
- extends Object
Once persisted the versions of a resource will be written as a byte stream and it is often not so
useful to be accessed in such a format. This class is able to read through the stream and output
a list of versions.
This class works hand in hand with the version input stream, where the version input stream
persists data to the database, and the version retriever fetches persisted versions from the
database.
- See Also:
VersionInputStream
Method Summary |
long |
getVersion(int versionIndex)
Method to fetch the version at the given index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VersionRetriever
public VersionRetriever(InputStream inputStream)
- Creates a version retriever from the given input stream.
- Parameters:
inputStream
- a stream of versions as bytes.
getVersion
public long getVersion(int versionIndex)
throws RegistryException
- Method to fetch the version at the given index.
- Parameters:
versionIndex
- the version index.
- Returns:
- the version at the given index.
- Throws:
RegistryException
- if the operation failed.
Copyright © 2014 WSO2 Inc. All Rights Reserved.