Examples of BinaryData


Examples of org.apache.olingo.odata2.annotation.processor.core.datasource.DataSource.BinaryData

    final byte[] value = EntityProvider.readBinary(content);

    context.stopRuntimeMeasurement(timingHandle);

    final EdmEntitySet entitySet = uriInfo.getTargetEntitySet();
    dataSource.writeBinaryData(entitySet, data, new BinaryData(value, requestContentType));

    return ODataResponse.newBuilder().eTag(constructETag(entitySet, data)).build();
  }
View Full Code Here

Examples of org.apache.olingo.odata2.ref.processor.ListsDataSource.BinaryData

    ExpandSelectTreeNode expandSelectTree = null;

    if (entityType.hasStream()) {
      dataSource.createData(entitySet, data);
      dataSource.writeBinaryData(entitySet, data,
          new BinaryData(EntityProvider.readBinary(content), requestContentType));

    } else {
      final EntityProviderReadProperties properties = EntityProviderReadProperties.init()
          .mergeSemantic(false)
          .addTypeMappings(getStructuralTypeTypeMap(data, entityType))
View Full Code Here

Examples of org.apache.olingo.odata2.ref.processor.ScenarioDataSource.BinaryData

    ExpandSelectTreeNode expandSelectTree = null;

    if (entityType.hasStream()) {
      dataSource.createData(entitySet, data);
      dataSource.writeBinaryData(entitySet, data,
          new BinaryData(EntityProvider.readBinary(content), requestContentType));

    } else {
      final EntityProviderReadProperties properties = EntityProviderReadProperties.init()
          .mergeSemantic(false)
          .addTypeMappings(getStructuralTypeTypeMap(data, entityType))
View Full Code Here

Examples of org.apache.olingo.odata2.ref.processor.ScenarioDataSource.BinaryData

    if (!appliesFilter(data, uriInfo.getFilter())) {
      throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
    }

    final EdmEntitySet entitySet = uriInfo.getTargetEntitySet();
    final BinaryData binaryData = dataSource.readBinaryData(entitySet, data);
    if (binaryData == null) {
      throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
    }

    final String mimeType = binaryData.getMimeType() == null ?
        HttpContentType.APPLICATION_OCTET_STREAM : binaryData.getMimeType();

    return ODataResponse.fromResponse(EntityProvider.writeBinary(mimeType, binaryData.getData())).eTag(
        constructETag(entitySet, data)).build();
  }
View Full Code Here

Examples of org.apache.olingo.odata2.ref.processor.ScenarioDataSource.BinaryData

    if (data == null) {
      throw new ODataNotFoundException(ODataNotFoundException.ENTITY);
    }

    dataSource.writeBinaryData(uriInfo.getTargetEntitySet(), data, new BinaryData(null, null));

    return ODataResponse.newBuilder().build();
  }
View Full Code Here

Examples of org.apache.olingo.odata2.ref.processor.ScenarioDataSource.BinaryData

    final byte[] value = EntityProvider.readBinary(content);

    context.stopRuntimeMeasurement(timingHandle);

    final EdmEntitySet entitySet = uriInfo.getTargetEntitySet();
    dataSource.writeBinaryData(entitySet, data, new BinaryData(value, requestContentType));

    return ODataResponse.newBuilder().eTag(constructETag(entitySet, data)).build();
  }
View Full Code Here

Examples of org.hsqldb.types.BinaryData

            // fall through
            case Types.SQL_BINARY :
            case Types.SQL_VARBINARY :
                if (o instanceof byte[]) {
                    o = new BinaryData((byte[]) o, !connection.isNetConn);

                    break;
                }

                try {
View Full Code Here

Examples of org.hsqldb.types.BinaryData

            }

            break;
        }

        token.tokenValue = new BinaryData(byteOutputStream.toByteArray(),
                                          false);

        byteOutputStream.reset(byteBuffer);
    }
View Full Code Here

Examples of org.hsqldb.types.BinaryData

        if (token.isMalformed) {
            throw Error.error(ErrorCode.X_22018);
        }

        BinaryData data = new BinaryData(byteOutputStream.toByteArray(),
                                         false);

        byteOutputStream.reset(byteBuffer);

        return data;
View Full Code Here

Examples of org.hsqldb.types.BinaryData

    }

    BinaryData readSizedBinaryData() throws IOException {
        int len = readInt();
        try {
            return (len < 0) ? null : new BinaryData((long) len, this);
        } catch (HsqlException he) {
            throw new IOException(he.getMessage());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.