Examples of encode()


Examples of org.kiji.schema.KijiCellEncoder.encode()

    if (null == value) {
      encoded = null;
    } else {
      final KijiCellEncoder cellEncoder =
          capsule.getCellEncoderProvider().getEncoder(family, qualifier);
      encoded = cellEncoder.encode(value);
    }

    SchemaPlatformBridge bridge = SchemaPlatformBridge.get();
    for (KeyValue kv : mHopper) {
      bridge.addKVToPut(mPut, kv);

Examples of org.libtiff.jai.codec.XTIFFTileCodec.encode()

        for (int row = 0; row < length; row += tileLength) {
            for (int col = 0; col < width; col += tileWidth) {
                if (!isTiled)
                    rows = Math.min(tileLength, length - row);
                rect.setRect(minX + col, minY + row, cols, rows);
                int tileSize = codec.encode(im, rect, bpixels);
                out.write(bpixels, 0, tileSize);
                stripTileOffsets[i] = currentOffset;
                stripTileByteCounts[i++] = tileSize;
                currentOffset += tileSize;
                total += tileSize;

Examples of org.modeshape.common.text.Jsr283Encoder.encode()

        assertThat(path.getString(registry), is("/a/b/c"));
        assertThat(path.getString(registry, encoder), is("/a/b/c"));
        assertThat(path.getString(registry, encoder, delimEncoder), is("\\/a\\/b\\/c"));

        path = pathFactory.create("/mode:a/b/c");
        assertThat(path.getString(encoder), is("/{" + encoder.encode(ModeShapeLexicon.Namespace.URI) + "}a/{}b/{}c"));
        assertThat(path.getString(null, encoder, delimEncoder), is("\\/mode:a\\/\\{\\}b\\/\\{\\}c"));
        assertThat(path.getString(registry), is("/mode:a/b/c"));
        assertThat(path.getString(registry, encoder), is("/mode:a/b/c"));
        assertThat(path.getString(registry, encoder, delimEncoder), is("\\/mode\\:a\\/b\\/c"));
    }

Examples of org.modeshape.common.text.TextEncoder.encode()

    @Test
    public void shouldAlwaysReturnPathWithSingleSlashForGetString() {
        NamespaceRegistry registry = mock(NamespaceRegistry.class);
        TextEncoder encoder = mock(TextEncoder.class);
        when(encoder.encode("/")).thenReturn("/");
        assertThat(root.getString(), is("/"));
        assertThat(root.getString(registry), is("/"));
        assertThat(root.getString(registry, encoder), is("/"));
        assertThat(root.getString(registry, encoder, encoder), is("/"));
        assertThat(root.getString(encoder), is("/"));

Examples of org.modeshape.jcr.api.Session.encode()

            // if first character is a '{' then the name is prefixed by the namespace URL
            if ((jcrName.charAt(0) == '{') && (jcrName.indexOf('}') != -1)) {
                final int index = jcrName.indexOf('}');
                String localName = jcrName.substring(index + 1);
                localName = session.encode(localName);

                jcrName = jcrName.substring(0, (index + 1)) + localName;
            } else {
                jcrName = session.encode(jcrName);
            }

Examples of org.mortbay.resource.Resource.encode()

      if(Oscar3Props.getInstance().serverType.equals("full")) {
        r = Resource.newClassPathResource("uk/ac/cam/ch/wwmm/oscar3server/resources/fullweb/");
      } else {
        r = Resource.newClassPathResource("uk/ac/cam/ch/wwmm/oscar3server/resources/cutdownweb/");       
      }
      r.encode("UTF-8");
      ResourceHandler rh = new ResourceHandler();
      rh.setBaseResource(r);
      //server.addHandler(rh);
      context.setHandler(rh);

Examples of org.mozilla.jss.asn1.SEQUENCE.encode()

          .getFieldSize() + 7) / 8];
      tmp[0] = 0x02;
      tmp[1] = (byte) EcCore.fieldElemToBytes(s, params, tmp, 2);
      seq.addElement(new ANY(tmp));

      seq.encode(baos);
    } catch (Exception ex) {
      throw new SignatureException("Internal ASN.1 encoding error", ex);
    }

    return baos.toByteArray();

Examples of org.nasutekds.server.replication.protocol.LDAPUpdateMsg.encode()

          // mechanism. If assured replication is disabled, this returns
          // immediately
          prepareWaitForAckIfAssuredEnabled(msg);
          try
          {
            msg.encode();
          } catch (UnsupportedEncodingException e)
          {
            // will be caught at publish time.
          }
          pendingChanges.commitAndPushCommittedChanges(curChangeNumber, msg);

Examples of org.neo4j.batchimport.structs.Property.encode()

    private void encodeProperties(PropertyHolder holder) {
        if (holder.propertyCount ==0) return;
        // todo cache encoded blocks in an LRU cache
        for (int id = 0; id < holder.propertyCount; id++) {
            Property value = holder.properties[id];
            value.encode(propStore);
            count++;
        }
    }

    @Override

Examples of org.nfctools.ndef.NdefMessageEncoder.encode()

  public static byte[] toByteArray(Collection<Record> records) {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream(1024);
    DataOutputStream output = new DataOutputStream(buffer);
    NdefMessageEncoder ndefMessageEncoder = NdefContext.getNdefMessageEncoder();
    try {
      byte[] bytes = ndefMessageEncoder.encode(records);
      output.writeByte(VERSION);
      output.writeInt(1);
      output.writeByte(ACTION_IMMEDIATE);
      output.writeInt(bytes.length);
      output.write(bytes);
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.