Examples of BinaryData


Examples of Framework.BinaryData

        try {
            //Blob theBlob = resultSet.getBlob(pColumnName);
            byte[] byteArray = resultSet.getBytes(pColumnName);

            if (byteArray == null || resultSet.wasNull()) {
                return new BinaryData();
            }

            else {
                // byte[] byteArray = theBlob.getBytes(1, (int)theBlob.length());
                return new BinaryData(byteArray);
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of Framework.BinaryData

              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), Framework.Constants.SP_ER_USER, Framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

Examples of Framework.BinaryData

            // Blob theBlob = resultSet.getBlob(ColumnID);
            byte[] byteArray = resultSet.getBytes(ColumnID);

            if (byteArray == null || resultSet.wasNull()) {
                return new BinaryData();
            }

            else {
                //byte[] byteArray = theBlob.getBytes(1, (int)theBlob.length());
                return new BinaryData(byteArray);
            }

        } catch (SQLException e) {
          throw processException(e);
        }
View Full Code Here

Examples of Framework.BinaryData

        try {
            //Blob theBlob = resultSet.getBlob(pColumnName);
            byte[] byteArray = resultSet.getBytes(pColumnName);

            if (byteArray == null || resultSet.wasNull()) {
                return new BinaryData();
            }

            else {
                // byte[] byteArray = theBlob.getBytes(1, (int)theBlob.length());
                return new BinaryData(byteArray);
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.BinaryData

              cachedRowSet.updateBoolean(pColOrdinal, value.getBooleanValue());
            } else if (pValue instanceof DateTimeData) {
              DateTimeData value = (DateTimeData) pValue;
              cachedRowSet.updateDate(pColOrdinal, new Date(value.asDate().getTime()));
            } else if (pValue instanceof BinaryData) {
              BinaryData value = (BinaryData) pValue;
              cachedRowSet.updateBinaryStream(pColOrdinal, new ByteArrayInputStream(value.getValue()), value.getActualSize());
            }
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.BinaryData

            // Blob theBlob = resultSet.getBlob(ColumnID);
            byte[] byteArray = resultSet.getBytes(ColumnID);

            if (byteArray == null || resultSet.wasNull()) {
                return new BinaryData();
            }

            else {
                //byte[] byteArray = theBlob.getBytes(1, (int)theBlob.length());
                return new BinaryData(byteArray);
            }

        } catch (SQLException e) {
          throw processException(e);
        }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.BinaryData

        try {
            //Blob theBlob = resultSet.getBlob(pColumnName);
            byte[] byteArray = resultSet.getBytes(pColumnName);

            if (byteArray == null || resultSet.wasNull()) {
                return new BinaryData();
            }

            else {
                // byte[] byteArray = theBlob.getBytes(1, (int)theBlob.length());
                return new BinaryData(byteArray);
            }
        } catch (SQLException e) {
          throw processException(e);
        }
    }
View Full Code Here

Examples of org.apache.olingo.odata2.annotation.processor.core.datasource.DataSource.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.annotation.processor.core.datasource.DataSource.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.annotation.processor.core.datasource.DataSource.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
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.