Examples of asBinary()


Examples of com.esri.core.geometry.ogc.OGCGeometry.asBinary()

      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    try {
      ByteBuffer byteBuf = ogcGeometry.asBinary();
      byte [] byteArr = byteBuf.array();
      return new BytesWritable(byteArr);
    } catch (Exception e){
      LOG.error(e.getMessage());
      return null;
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry.asBinary()

      LogUtils.Log_ArgumentsNull(LOG);
      return null;
    }

    try {
      ByteBuffer byteBuf = ogcGeometry.asBinary();
      byte [] byteArr = byteBuf.array();
      return new BytesWritable(byteArr);
    } catch (Exception e){
      LOG.error(e.getMessage());
      return null;
View Full Code Here

Examples of com.esri.core.geometry.ogc.OGCGeometry.asBinary()

    assertTrue(gc2.geometryN(2).geometryType().equals("LineString"));
    assertTrue(gc2.geometryN(3).geometryType().equals("MultiPolygon"));
    assertTrue(gc2.geometryN(4).geometryType().equals("MultiLineString"));
    assertTrue(gc2.geometryN(5).geometryType().equals("MultiPoint"));

    ByteBuffer wkbBuffer = g.asBinary();
    g = OGCGeometry.fromBinary(wkbBuffer);

    assertTrue(g.geometryType().equals("GeometryCollection"));
    gc = (OGCConcreteGeometryCollection) g;
    assertTrue(gc.numGeometries() == 7);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asBinary()

        Assert.assertEquals(OSDType.Binary, llsdBytes.getType());
        byte[] contentBinString = { 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x73,
                                    0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x63, 0x6f,
                                    0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68,
                                    0x69, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa, 0xd };
        Assert.assertArrayEquals(contentBinString, llsdBytes.asBinary());
    }

    @Test
    public void SerializeLLSDBinary() throws Exception
    {
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asBinary()

              OSD llsdBinary = OSD.FromBinary(binary);
              String sBinarySerialized = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdBinary);
              OSD llsdBinaryDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sBinarySerialized);
              Assert.assertEquals(OSDType.Binary, llsdBinaryDS.getType());
              Assert.assertArrayEquals(binary, llsdBinaryDS.asBinary());
          }

          @Test
          public void DeserializeArray() throws OSDException, IOException
          {
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSDBinary.asBinary()

        114, 111, 119, 110, 32, 102, 111, 120};
    TestHelper.TestBinary(tempBinary, testData2);

    Assert.assertEquals(OSDType.Binary, array.get(1).getType());
    tempBinary = (OSDBinary)array.get(2);
    Assert.assertEquals(0, tempBinary.asBinary().length);
  }

  /// <summary>
  /// Test that undefened elements are parsed correctly.
  /// Currently this just checks that there instanceof no error since undefined has no
View Full Code Here

Examples of org.msgpack.value.Value.asBinary()

        }
        Value v = (Value) o;
        if (!v.isBinary()) {
            return false;
        }
        BinaryValue bv = v.asBinary();
        return bv.toByteBuffer().equals(byteBuffer);
    }

    @Override
    public int hashCode() {
View Full Code Here

Examples of org.tmatesoft.hg.internal.DigestHelper.asBinary()

            }
          }
          //
          byte[] csetContent = ge.patch().apply(prevRevContent, -1);
          dh = dh.sha1(ge.firstParent(), ge.secondParent(), csetContent); // XXX ge may give me access to byte[] content of nodeid directly, perhaps, I don't need DH to be friend of Nodeid?
          if (!ge.node().equalsTo(dh.asBinary())) {
            throw new HgInvalidStateException(String.format("Integrity check failed on %s, node: %s", bundleFile, ge.node().shortNotation()));
          }
          RawChangeset cs = csetBuilder.parse(csetContent);
          inspector.next(revisionIndex++, ge.node(), cs);
          prevRevContent.done();
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.