Examples of binaryValue()


Examples of com.fasterxml.jackson.databind.JsonNode.binaryValue()

        return ((POJONode) propertyNode).getPojo();
      case STRING:
        return propertyNode.asText();
      case BINARY:
        try {
          return propertyNode.binaryValue();
        } catch (IOException ignore) {
          return null;
        }

      case ARRAY:
View Full Code Here

Examples of com.fasterxml.jackson.databind.JsonNode.binaryValue()

        throws IOException, JsonParseException
    {
        // Multiple possibilities...
        JsonNode n = currentNode();
        if (n != null) { // binary node?
            byte[] data = n.binaryValue();
            // (or TextNode, which can also convert automatically!)
            if (data != null) {
                return data;
            }
            // Or maybe byte[] as POJO?
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

    for(int i=0;i<50;i++)
      b[i] = (byte) (i+77);

    Document doc = new Document();
    Field f = new StoredField("binary", b, 10, 17);
    byte[] bx = f.binaryValue().bytes;
    assertTrue(bx != null);
    assertEquals(50, bx.length);
    assertEquals(10, f.binaryValue().offset);
    assertEquals(17, f.binaryValue().length);
    doc.add(f);
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

    Document doc = new Document();
    Field f = new StoredField("binary", b, 10, 17);
    byte[] bx = f.binaryValue().bytes;
    assertTrue(bx != null);
    assertEquals(50, bx.length);
    assertEquals(10, f.binaryValue().offset);
    assertEquals(17, f.binaryValue().length);
    doc.add(f);
    w.addDocument(doc);
    w.close();
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

    Field f = new StoredField("binary", b, 10, 17);
    byte[] bx = f.binaryValue().bytes;
    assertTrue(bx != null);
    assertEquals(50, bx.length);
    assertEquals(10, f.binaryValue().offset);
    assertEquals(17, f.binaryValue().length);
    doc.add(f);
    w.addDocument(doc);
    w.close();

    IndexReader ir = DirectoryReader.open(dir);
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

          if (d != null) {
            val = d.decodeStored(f.name(), f);
          }
        }
        if (!decode || val == null) {
          if (f.binaryValue() != null) {
            val = Util.bytesToHex(f.binaryValue(), false);
          } else {
            val = f.stringValue();
          }
        }
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

            val = d.decodeStored(f.name(), f);
          }
        }
        if (!decode || val == null) {
          if (f.binaryValue() != null) {
            val = Util.bytesToHex(f.binaryValue(), false);
          } else {
            val = f.stringValue();
          }
        }
        bw.write("<val>" + Util.xmlEscape(val) + "</val>\n");
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

              Field f = null;
              if (fields != null && fields.length > i) {
                f = (Field)fields[i];
                setString(fType, "text", "Original stored field content");
                String text;
                if (f.binaryValue() != null) {
                  text = Util.bytesToHex(f.binaryValue(), true);
                  setBoolean(cbBin, "selected", true);
                } else {
                  text = f.stringValue();
                }
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

              if (fields != null && fields.length > i) {
                f = (Field)fields[i];
                setString(fType, "text", "Original stored field content");
                String text;
                if (f.binaryValue() != null) {
                  text = Util.bytesToHex(f.binaryValue(), true);
                  setBoolean(cbBin, "selected", true);
                } else {
                  text = f.stringValue();
                }
                setString(sText, "text", text);
View Full Code Here

Examples of org.apache.lucene.document.Field.binaryValue()

    add(row, cell);
    cell = create("cell");
    if (f != null) {
      String text = f.stringValue();
      if (text == null) {
        if (f.binaryValue() != null) {
          text = Util.bytesToHex(f.binaryValue(), false);
        } else {
          text = "(null)";
        }
      }
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.