Package Framework

Examples of Framework.BinaryData


            byte[] buffer = new byte[1024];
            BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
            int bytesRead;
            int totalLength = 0;
            while ((bytesRead = bis.read(buffer)) >= 0) {
                BinaryData data = new BinaryData(buffer);
              ent.writeBinary(data, bytesRead);
              totalLength += bytesRead;
            }
           
            br.setBody(ent);
View Full Code Here


     * <p>
     *
     * @return BinaryData
     */
    public BinaryData getContentData() {
        BinaryData binData = new BinaryData();

        if (this.data != null) {
            //
            //  If there is any conversion needed to send the data,
            //  keep the user data unchanged.
View Full Code Here

        super();
        this.content = pFile;
    }

    public BinaryData getBinaryBody() {
        return new BinaryData(this.content.get());
    }
View Full Code Here

        super();
        this.content = pFile;
    }

    public BinaryData getBinaryBody() {
        return new BinaryData(this.content.get());
    }
View Full Code Here

            byte[] buffer = new byte[1024];
            BufferedInputStream bis = new BufferedInputStream(conn.getInputStream());
            int bytesRead;
            int totalLength = 0;
            while ((bytesRead = bis.read(buffer)) >= 0) {
                BinaryData data = new BinaryData(buffer);
              ent.writeBinary(data, bytesRead);
              totalLength += bytesRead;
            }
           
            br.setBody(ent);
View Full Code Here

                result.concat("\"");
                result.concat(attr);
                result.concat("\"");
            }
            else if (attr instanceof BinaryData || attr instanceof ImageData) {
                BinaryData a = null;
                if (attr instanceof ImageData) {
                    a = new BinaryData();
                    a.setValue(attr);
                }
                else {
                    a = (BinaryData)attr;
                }
                byte[] p = a.getValue();
                int n = ((BinaryData)a).getActualSize();
                int sum = 0;
                result.concat("0x");
                if (n > 16) {
                    n = 16;
View Full Code Here

     * <p>
     *
     * @return BinaryData
     */
    public BinaryData getContentData() {
        BinaryData binData = new BinaryData();

        if (this.data != null) {
            //
            //  If there is any conversion needed to send the data,
            //  keep the user data unchanged.
View Full Code Here

                result.concat("\"");
                result.concat(attr);
                result.concat("\"");
            }
            else if (attr instanceof BinaryData || attr instanceof ImageData) {
                BinaryData a = null;
                if (attr instanceof ImageData) {
                    a = new BinaryData();
                    a.setValue(attr);
                }
                else {
                    a = (BinaryData)attr;
                }
                byte[] p = a.getValue();
                int n = ((BinaryData)a).getActualSize();
                int sum = 0;
                result.concat("0x");
                if (n > 16) {
                    n = 16;
View Full Code Here

              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

            // 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

TOP

Related Classes of Framework.BinaryData

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.