Package org.uscxml

Examples of org.uscxml.Blob


      for (int i = 0; i < origData.length; i++) {
        origData[i] = (byte) i;
      }

      {
        Blob blob = new Blob(origData, "application/octet-stream");
        if (origData.length != blob.getSize())
          throw new RuntimeException("Blob does not match");

        for (int i = 0; i < origData.length; i++) {
          if (origData[i] != blob.getData()[i])
            throw new RuntimeException("Blob mismatch at " + i);
        }
      }

      Data data = new Data(origData, "application/octet-stream");
      Blob blob = data.getBinary();
      System.out.println(blob.getSize());

      byte newData[] = blob.getData();

      if (newData.length != origData.length)
        throw new RuntimeException("Arrays length does not match");
      for (int i = 0; i < origData.length; i++) {
        if (newData[i] != origData[i])
View Full Code Here

TOP

Related Classes of org.uscxml.Blob

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.