Package org.hibernate.engine.jdbc.internal

Examples of org.hibernate.engine.jdbc.internal.BinaryStreamImpl


   *
   * @param bytes The byte array
   * @see #generateProxy(byte[])
   */
  private BlobProxy(byte[] bytes) {
    binaryStream = new BinaryStreamImpl( bytes );
  }
View Full Code Here


    }
    else if ( InputStream.class.isAssignableFrom( type ) ) {
      return (X) new ByteArrayInputStream( toBytes( value ) );
    }
    else if ( BinaryStream.class.isAssignableFrom( type ) ) {
      return (X) new BinaryStreamImpl( toBytes( value ) );
    }
    else if ( Blob.class.isAssignableFrom( type )) {
      return (X) options.getLobCreator().createBlob( toBytes(value) );
    }
   
View Full Code Here

   * @param length The amount to extract
   *
   * @return The extracted bytes as a stream
   */
  public static InputStream subStream(InputStream inputStream, long start, int length) {
    return new BinaryStreamImpl( extractBytes( inputStream, start, length ) );
  }
View Full Code Here

    }
    if ( InputStream.class.isAssignableFrom( type ) ) {
      return (X) new ByteArrayInputStream( unwrapBytes( value ) );
    }
    if ( BinaryStream.class.isAssignableFrom( type ) ) {
      return (X) new BinaryStreamImpl( unwrapBytes( value ) );
    }
    if ( Blob.class.isAssignableFrom( type ) ) {
      return (X) options.getLobCreator().createBlob( unwrapBytes( value ) );
    }
View Full Code Here

          // if the incoming Blob is a wrapper, just pass along its BinaryStream
          return (X) ( (BlobImplementer) value ).getUnderlyingStream();
        }
        else {
          // otherwise we need to build a BinaryStream...
          return (X) new BinaryStreamImpl( DataHelper.extractBytes( value.getBinaryStream() ) );
        }
      }
      else if ( byte[].class.isAssignableFrom( type )) {
        if ( BlobImplementer.class.isInstance( value ) ) {
          // if the incoming Blob is a wrapper, just grab the bytes from its BinaryStream
View Full Code Here

    }
    if ( InputStream.class.isAssignableFrom( type ) ) {
      return (X) new ByteArrayInputStream( value );
    }
    if ( BinaryStream.class.isAssignableFrom( type ) ) {
      return (X) new BinaryStreamImpl( value );
    }
    if ( Blob.class.isAssignableFrom( type ) ) {
      return (X) options.getLobCreator().createBlob( value );
    }
View Full Code Here

   *
   * @param bytes The byte array
   * @see #generateProxy(byte[])
   */
  private BlobProxy(byte[] bytes) {
    binaryStream = new BinaryStreamImpl( bytes );
  }
View Full Code Here

   *
   * @param bytes The byte array
   * @see #generateProxy(byte[])
   */
  private BlobProxy(byte[] bytes) {
    binaryStream = new BinaryStreamImpl( bytes );
  }
View Full Code Here

   *
   * @param bytes The byte array
   * @see #generateProxy(byte[])
   */
  private BlobProxy(byte[] bytes) {
    binaryStream = new BinaryStreamImpl( bytes );
  }
View Full Code Here

    }
    else if ( InputStream.class.isAssignableFrom( type ) ) {
      return (X) new ByteArrayInputStream( toBytes( value ) );
    }
    else if ( BinaryStream.class.isAssignableFrom( type ) ) {
      return (X) new BinaryStreamImpl( toBytes( value ) );
    }
    else if ( Blob.class.isAssignableFrom( type )) {
      return (X) options.getLobCreator().createBlob( toBytes(value) );
    }
   
View Full Code Here

TOP

Related Classes of org.hibernate.engine.jdbc.internal.BinaryStreamImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.