Examples of Blob


Examples of com.github.api.v2.schema.Blob

  public void testGetBlob() {
      assertNotNullOrEmpty(String.format(RESOURCE_MISSING_MESSAGE, "Test Username."), TestConstants.TEST_USER_NAME);
      assertNotNullOrEmpty(String.format(RESOURCE_MISSING_MESSAGE, "Test Repository."), TestConstants.TEST_REPOSITORY_NAME);
      assertNotNullOrEmpty(String.format(RESOURCE_MISSING_MESSAGE, "Test Tree SHA."), TestConstants.TEST_TREE_SHA);
      assertNotNullOrEmpty(String.format(RESOURCE_MISSING_MESSAGE, "Test File Path."), TestConstants.TEST_FILE_PATH);
    Blob blob = service.getBlob(TestConstants.TEST_USER_NAME, TestConstants.TEST_REPOSITORY_NAME, TestConstants.TEST_TREE_SHA, TestConstants.TEST_FILE_PATH);
    assertNotNull("Blob cannot be null or empty", blob);
  }
View Full Code Here

Examples of com.google.appengine.api.datastore.Blob

  public static void setProperty(Entity entity, String name, byte[] value) {
    if (value == null) {
      entity.setProperty(name, null);
    }
    else {
      entity.setProperty(name, new Blob(value));
    }
  }
View Full Code Here

Examples of com.google.appengine.api.datastore.Blob

    if (value == null) {
      entity.setUnindexedProperty(name, null);
    }
    else {
      entity.setUnindexedProperty(name,
          new Blob(StreamUtil.toBytes(value)));
    }
  }
View Full Code Here

Examples of com.google.gwt.gears.client.blob.Blob

             * @see com.google.gwt.gears.client.desktop.OpenFilesHandler#onOpenFiles(com.google.gwt.gears.client.desktop.OpenFilesHandler.OpenFilesEvent)
             */
            public void onOpenFiles(OpenFilesEvent event){
              File[] files = event.getFiles();
              File file = files[0];
              Blob data = file.getBlob();
              BlobReader reader = new BlobReader(data);
              String map = "";
              while(!reader.endOfBlob())
                map = map + reader.readLine() + "\n";
              Home.webError(map);
View Full Code Here

Examples of com.jcabi.github.Blob

     * @throws Exception if a problem occurs.
     */
    @Test
    public void canCreateBlob() throws Exception {
        final Blobs blobs = repo().git().blobs();
        final Blob blob = blobs.create("content1", "encoding1");
        MatcherAssert.assertThat(
            blobs.get(blob.sha()),
            Matchers.equalTo(blob)
        );
    }
View Full Code Here

Examples of com.mysql.jdbc.Blob

        pki.setTransId(Long.toString(randomNumber));
        pki.setMerchant("");
        pki.setAmountInvolved(amount);
        pki.setTransDetail("Transfer From Individual " + principal.getName());
          //get a blob out of the keypair
          Blob blob = pkiBO.createKeyBlob(keyPair);
         
        //UPDATING THE ENTRY IN DATABASE
          pki.setCert(blob);
          pkiBO.save(pki);
         
View Full Code Here

Examples of diva.canvas.connector.Blob

        Site a = figureA.getE();
        Site b = figureB.getN();
        connectorA = new StraightConnector(a, b);

        // Add the circle and arrowhead to it
        Blob blob = new Blob(a.getX(), a.getY(), a.getNormal(),
                Blob.BLOB_CIRCLE);
        connectorA.setTailEnd(blob);

        Arrowhead arrow = new Arrowhead(b.getX(), b.getY(), b.getNormal());
        connectorA.setHeadEnd(arrow);

        // Add it to the layer
        layer.add(connectorA);

        // Create the second connector
        Site c = figureA.getS();
        Site d = figureB.getW();
        connectorB = new ManhattanConnector(c, d);

        // Add the diamond
        Blob diamond = new Blob(c.getX(), c.getY(), c.getNormal(),
                Blob.BLOB_DIAMOND);
        diamond.setSizeUnit(6.0);
        diamond.setFilled(false);
        connectorB.setTailEnd(diamond);

        // Add it to the layer
        layer.add(connectorB);
    }
View Full Code Here

Examples of java.sql.Blob

            bytes = ObjectConverterUtil.convertToByteArray(new ReaderInputStream(clob.getCharacterStream(), this.encoding), this.maxLobSize);
          }             
          break;
         
        case PG_TYPE_BYTEA:
          Blob blob = rs.getBlob(column);
          if (blob != null) {
            try {
              bytes = PGbytea.toPGString(ObjectConverterUtil.convertToByteArray(blob.getBinaryStream(), this.maxLobSize)).getBytes(this.encoding);
            } catch(OutOfMemoryError e) {
              throw new StreamCorruptedException("data too big: " + e.getMessage()); //$NON-NLS-1$
            }
          }
          break;
View Full Code Here

Examples of java.sql.Blob

        if (value == null) {
            return null;
        } else if (value instanceof byte[]) {
          return (byte[])value;
        } else if (value instanceof Blob) {
            Blob blob = (Blob)value;
            long length = blob.length();
            if (length > Integer.MAX_VALUE) {
                throw new TeiidSQLException(JDBCPlugin.Util.getString("DataTypeTransformer.blob_too_big")); //$NON-NLS-1$
            }
            return blob.getBytes(1, (int)length);
        } else if (value instanceof String) {
          return ((String)value).getBytes();
        }
        throw new TeiidSQLException(JDBCPlugin.Util.getString("DataTypeTransformer.cannot_get_bytes")); //$NON-NLS-1$
    }
View Full Code Here

Examples of java.sql.Blob

        final byte[] buffer = new byte[10000];

        Task task1 = new Task() {
            public void call() throws Exception {
                while (!stop) {
                    Blob b = conn1.createBlob();
                    OutputStream out = b.setBinaryStream(1);
                    out.write(buffer);
                    out.close();
                }
            }
        };
        Task task2 = new Task() {
            public void call() throws Exception {
                while (!stop) {
                    Blob b = conn2.createBlob();
                    OutputStream out = b.setBinaryStream(1);
                    out.write(buffer);
                    out.close();
                }
            }
        };
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.