Examples of writeByte()


Examples of org.msgpack.packer.Packer.writeByte()

    @Override
    public void testByte(byte v) throws Exception {
  MessagePack msgpack = new JSON();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  packer.writeByte(v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createBufferUnpacker(bytes);
  byte ret = unpacker.readByte();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Unconverter.writeByte()

    @Override
    public void testByte(byte v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeByte(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        Value ret = unpacker.readValue();
        assertEquals(r, ret);
    }
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.writeByte()

            }
        };
        revlogHeader.serialize(sds);

        if (useUncompressedData) {
          sds.writeByte((byte) 'u');
          dataSource.serialize(sds);
        } else {
          int actualCompressedLenWritten = revlogDataZip.writeCompressedData(sds);
          if (actualCompressedLenWritten != compressedLen) {
            throw new HgInvalidStateException(String.format("Expected %d bytes of compressed data, but actually wrote %d in %s", compressedLen, actualCompressedLenWritten, filename));
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.OutputStreamSerializer.writeByte()

        // although BundleFormat page says "filename length, filename" for a file,
        // in fact there's a sort of 'filename chunk', i.e. filename length field includes
        // not only length of filename, but also length of the field itseld, i.e. filename.length+sizeof(int)
        byte[] fnameBytes = fnEncoder.toBundle(df.getPath());
        outRaw.writeInt(fnameBytes.length + 4);
        outRaw.writeByte(fnameBytes);
        new ChunkGenerator(outRaw, clogMap).iterate(s, fileRevs.toArray(true));
        outRaw.writeInt(0); // null chunk for file group
      }
    }
    outRaw.writeInt(0); // null chunk to indicate no more files (although BundleFormat page doesn't mention this)
View Full Code Here

Examples of org.voltdb.messaging.FastSerializer.writeByte()

                System.exit(-1);
            }
            byte passwordHash[] = md.digest(password.getBytes());
            FastSerializer fs = new FastSerializer();
            fs.writeInt(0);             // placeholder for length
            fs.writeByte(0);            // version
            fs.writeString(service);    // data service (export|database)
            fs.writeString(username);
            fs.write(passwordHash);
            final ByteBuffer fsBuffer = fs.getBuffer();
            final ByteBuffer b = ByteBuffer.allocate(fsBuffer.remaining());
View Full Code Here

Examples of streamer.ByteBuffer.writeByte()

        super.onStart();

        int length = 1;
        ByteBuffer buf = new ByteBuffer(length, true);

        buf.writeByte(0x28); // AttachUserRequest

        pushDataToOTOut(buf);

        switchOff();
    }
View Full Code Here

Examples of sun.rmi.server.MarshalOutputStream.writeByte()

    out.writeByte (TransportConstants.Return);

    MarshalOutputStream objOut = new MarshalOutputStream (out);

    //Write return header
    objOut.writeByte (TransportConstants.NormalReturn);
    uid.write (objOut);
   
    //Write a list of valid lookup names
    log.log (Level.FINEST, "Writing list of valid lookup names");
    objOut.writeObject (new String[] {"ComputeEngine"});
View Full Code Here

Examples of tahrir.tools.ByteArraySegment.ByteArraySegmentBuilder.writeByte()

  @Test
  public void simpleReliableMessageSend() throws Exception {
    final ByteArraySegmentBuilder msgBuilder = ByteArraySegment.builder();

    for (int x = 0; x < 100; x++) {
      msgBuilder.writeByte(33);
    }

    sentMessage = msgBuilder.build();

    one2two.send(sentMessage, 1, new TrSentReceivedListenerBasicImpl());
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.writeByte()

    // Names of variables
    for (vr=0; vr<NumVars; vr++) {
      if (!write_tag(TAG_VARNAME, 14, newfile)) return false;
      f.writeInt(vr);
      for (int q=0; q<10; q++) f.writeByte((byte) VarName[vr][q]);
    }

    // Physical Units
    for (vr=0; vr<NumVars; vr++) {
      if (!write_tag(TAG_UNITS, 24, newfile)) return false;
View Full Code Here

Examples of uk.ac.ucl.panda.utility.io.IndexOutput.writeByte()

            } else {
              // this segment has deleted docs, so we have to
              // check for every doc if it is deleted or not
              for (int k = 0; k < maxDoc; k++) {
                if (!reader.isDeleted(k)) {
                  output.writeByte(normBuffer[k]);
                }
              }
            }
            if (checkAbort != null)
              checkAbort.work(maxDoc);
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.