com.sibvisions.rad.persist.jdbc
Class DBAccess.BlobFileHandle

java.lang.Object
  extended by com.sibvisions.rad.persist.jdbc.DBAccess.BlobFileHandle
All Implemented Interfaces:
IValidatable, IFileHandle
Enclosing class:
DBAccess

public static final class DBAccess.BlobFileHandle
extends java.lang.Object
implements IFileHandle, IValidatable

The DBAccess.BlobFileHandle is a simple IFileHandle implementation that stores a Blob and allows to retrieve it again.


Constructor Summary
DBAccess.BlobFileHandle(DBAccess pDBAccess, java.lang.String pStatement, java.lang.Object[] pParameter, java.lang.String pColumnName, long pLength)
          Creates a new instance of DBAccess.BlobFileHandle.
 
Method Summary
 java.lang.String getFileName()
          Gets the file name of this file handle.
 java.io.InputStream getInputStream()
          Gets the InputStream of this file handle.
 long getLength()
          Gets the length of the InputStream in bytes
 boolean isValid()
          Gets if this object is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBAccess.BlobFileHandle

public DBAccess.BlobFileHandle(DBAccess pDBAccess,
                               java.lang.String pStatement,
                               java.lang.Object[] pParameter,
                               java.lang.String pColumnName,
                               long pLength)
Creates a new instance of DBAccess.BlobFileHandle.

Parameters:
pDBAccess - the dBAccess.
pStatement - the statement.
pParameter - the parameter.
pColumnName - the column name.
pLength - the length.
Method Detail

getFileName

public java.lang.String getFileName()
Gets the file name of this file handle.

Specified by:
getFileName in interface IFileHandle
Returns:
the file name of this file handle.

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets the InputStream of this file handle.

Specified by:
getInputStream in interface IFileHandle
Returns:
the InputStream of this file handle.
Throws:
java.io.IOException - if an exception occurs.

getLength

public long getLength()
               throws java.io.IOException
Gets the length of the InputStream in bytes. -1 is returned if getInputStream is null.

Specified by:
getLength in interface IFileHandle
Returns:
the length of the InputStream in bytes.
Throws:
java.io.IOException - if an exception occurs.

isValid

public boolean isValid()
Gets if this object is valid.

Specified by:
isValid in interface IValidatable
Returns:
true if this object is valid.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.