Class StreamWrapper
java.lang.Object
org.apache.jackrabbit.core.util.db.StreamWrapper
-
Constructor Summary
ConstructorsConstructorDescriptionStreamWrapper(InputStream in, long size) Creates a wrapper for the given InputStream that can safely be passed as a parameter to theConnectionHelper.exec(String, Object...),ConnectionHelper.exec(String, Object[], boolean, int)andConnectionHelper.update(String, Object[])methods. -
Method Summary
Modifier and TypeMethodDescriptionvoidlonggetSize()booleanResets the internal InputStream that it could be re-read.
Is used fromConnectionHelper.RetryManagerif aSQLExceptionhas occurred.
It relies on the assumption that the InputStream was not marked anywhere during reading.
-
Constructor Details
-
StreamWrapper
Creates a wrapper for the given InputStream that can safely be passed as a parameter to theConnectionHelper.exec(String, Object...),ConnectionHelper.exec(String, Object[], boolean, int)andConnectionHelper.update(String, Object[])methods.- Parameters:
in- the InputStream to wrapsize- the size of the input stream
-
-
Method Details
-
getStream
-
getSize
public long getSize() -
closeStream
public void closeStream() -
resetStream
public boolean resetStream()Resets the internal InputStream that it could be re-read.
Is used fromConnectionHelper.RetryManagerif aSQLExceptionhas occurred.
It relies on the assumption that the InputStream was not marked anywhere during reading.- Returns:
- returns true if it was able to reset the Stream
-