Examples of writeString()


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

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

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

    @Override
    public void testString(String v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeString(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.red5.io.amf.Output.writeString()

  private void writeMetadataTag(double duration, Integer videoCodecId, Integer audioCodecId) throws IOException {
    metaPosition = channel.position();
    IoBuffer buf = IoBuffer.allocate(1024);
    buf.setAutoExpand(true);
    Output out = new Output(buf);
    out.writeString("onMetaData");
    Map<Object, Object> params = new HashMap<Object, Object>(4);
    params.put("duration", duration);
    if (videoCodecId != null) {
      params.put("videocodecid", videoCodecId.intValue());
    }
View Full Code Here

Examples of org.sonar.batch.symbol.SymbolData.writeString()

  }

  @Override
  public void setSymbolTable(SymbolTable symbolTable) {
    SymbolData symbolData = new SymbolData(((DefaultSymbolTable) symbolTable).getReferencesBySymbol());
    cache.setStringData(component().key(), SnapshotDataTypes.SYMBOL_HIGHLIGHTING, symbolData.writeString());
  }
}
View Full Code Here

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

            }
            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());
            b.put(fsBuffer);
View Full Code Here

Examples of promauto.utils.RpSerialPort.writeString()

         
      // Command - write and read string
      if (cmd[1].equals("str") || cmd[1].equals("s")) {
        RpSerialPort port = getPortForConsoleCommand(cmd);
        svcConsole.write(JRoboStrings.SVCSERIAL_WRITE_TO + port.getName()+": "+cmd[3]+"\n" );
        port.writeString(cmd[3]+"\n");
        Thread.sleep(500);
        svcConsole.write(JRoboStrings.SVCSERIAL_READ_FROM + port.getName()+": "+ port.readAllString() +"\n" );
      } else
     
      // Command - write and read hex
View Full Code Here

Examples of pt.opensoft.io.VariableSizeWriter.writeString()

                    case Types.DATE:
                    case Types.TIMESTAMP:
                        varWriter.writeDate(new DateTime(new Date(rs.getDate(i).getTime())), "yyyyMMdd");
                        break;
                    default:
                        varWriter.writeString(rs.getString(i), meta.getColumnDisplaySize(i));
                }
            }

            varWriter.writeLine();
        }
View Full Code Here

Examples of research.store.StorableOutput.writeString()

                //begin д����Ŀ�����ļ�
                StorableOutput textOutput = new StorableOutput(bufferStream);

                textOutput.writeInt(drawingViews.length);
                for (int i = 0; i < drawingViews.length; i++) {
                    textOutput.writeString(drawingViews[i].getDrawing().getTitle());
                }
                textOutput.close();

                ZipEntry indexZipEntry = new ZipEntry("index.txt");
                zipOutStream.putNextEntry(indexZipEntry);
View Full Code Here

Examples of streamer.ByteBuffer.writeString()

        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
        buf.writeByte(RdpConstants.RDP_NEG_REQ_TYPE_NEG_REQ);
        // RDP_NEG_REQ::flags (0)
        buf.writeByte(RdpConstants.RDP_NEG_REQ_FLAGS);
View Full Code Here

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

            Iterator it = entries.iterator();
            while(it.hasNext()) {
                FileEntry fe = (FileEntry) it.next();
                fe.directoryOffset = os.getFilePointer();
                os.writeLong(0);    // for now
                os.writeString(fe.file);
            }

            // Open the files and copy their data into the stream.
            // Remember the locations of each file's data section.
            byte buffer[] = new byte[16384];
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.