Class StreamWrapper
- java.lang.Object
-
- org.apache.jackrabbit.core.util.db.StreamWrapper
-
public class StreamWrapper extends Object
-
-
Constructor Summary
Constructors Constructor Description StreamWrapper(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseStream()longgetSize()InputStreamgetStream()booleanresetStream()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.
-
-
-
Constructor Detail
-
StreamWrapper
public StreamWrapper(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.- Parameters:
in- the InputStream to wrapsize- the size of the input stream
-
-
Method Detail
-
getStream
public InputStream 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
-
-