Package anvil.core

Examples of anvil.core.AnyBinary


  {
    int available = inputStream.available();
    byte byteBuf[] = new byte[available];
    int nbytes = inputStream.read(byteBuf);
    inputStream.close();
    return new AnyBinary(byteBuf);
  }
View Full Code Here


      case Types.BINARY:
      case Types.VARBINARY:
      case Types.LONGVARBINARY:
        byte[] bytes = set.getBytes(field);
        if (bytes != null) {
          return new AnyBinary(bytes);
        } else {
          return Any.NULL;
        }

      case Types.REF:
View Full Code Here

      case Types.BINARY:
      case Types.VARBINARY:
      case Types.LONGVARBINARY:
        byte[] bytes = stmt.getBytes(field);
        if (bytes != null) {
          return new AnyBinary(bytes);
        } else {
          return Any.NULL;
        }

      case Types.REF:
View Full Code Here

  public Any m_getContent(Context context)
  {
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    try {
      _resource.writeTo(output);
      return new AnyBinary(output.toByteArray());
    } catch (IOException e) {
      throw context.exception(e);
    }
  }
View Full Code Here

  /// @synopsis binary getBinaryContent()
  public static final Any getBinaryContent(Context context)
  {
    OutputStream o = context.getOutputStream();
    if ((o != null) && (o instanceof ByteArrayOutputStream)) {
      return new AnyBinary(((ByteArrayOutputStream)o).toByteArray());
    } else {
      return Any.NULL;
   
  }
View Full Code Here

          int length = parameters[2].toInt();
          if (offset < 0) {
            offset = 0;
          }
          if (offset >= size) {
            new AnyBinary();
          }
          if (offset + length > size) {
            length = size - offset;
          }
          return Any.create(_cipher.update(data, offset, length));
View Full Code Here

TOP

Related Classes of anvil.core.AnyBinary

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.