Examples of readString()


Examples of org.apache.lucene.store.DataInput.readString()

      inflTypeDict = new String[posSize];
      inflFormDict = new String[posSize];
      for (int j = 0; j < posSize; j++) {
        posDict[j] = in.readString();
        inflTypeDict[j] = in.readString();
        inflFormDict[j] = in.readString();
        // this is how we encode null inflections
        if (inflTypeDict[j].length() == 0) {
          inflTypeDict[j] = null;
        }
        if (inflFormDict[j].length() == 0) {
View Full Code Here

Examples of org.apache.lucene.store.IndexInput.readString()

    }
    IndexInput in=d.openInput("txid");
   
    long rtn=0l;
    try{
      rtn=Long.parseLong(in.readString());
    }catch (Throwable e) {
      rtn=0;
    }
    in.close();
    return rtn;
View Full Code Here

Examples of org.apache.lucene.store.InputStream.readString()

      return result;

    InputStream input = directory.openFile("deletable");
    try {
      for (int i = input.readInt(); i > 0; i--)    // read file names
        result.addElement(input.readString());
    } finally {
      input.close();
    }
    return result;
  }
View Full Code Here

Examples of org.apache.lucene.store.InputStreamDataInput.readString()

      int posSize = in.readVInt();
      posDict = new String[posSize];
      inflTypeDict = new String[posSize];
      inflFormDict = new String[posSize];
      for (int j = 0; j < posSize; j++) {
        posDict[j] = in.readString();
        inflTypeDict[j] = in.readString();
        inflFormDict[j] = in.readString();
        // this is how we encode null inflections
        if (inflTypeDict[j].length() == 0) {
          inflTypeDict[j] = null;
View Full Code Here

Examples of org.apache.lucene.util.PagedBytes.PagedBytesDataInput.readString()

    input.setPosition(indexToDataOffset.get(indexOffset));

    // read the term
    int fieldId = input.readVInt();
    Term field = fields[fieldId];
    Term term = field.createTerm(input.readString());

    // read the terminfo
    TermInfo termInfo = new TermInfo();
    termInfo.docFreq = input.readVInt();
    if (termInfo.docFreq >= skipInterval) {
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.readString()

    public void testWriteString() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeString("Bananas");
        bm.reset();
        String res = bm.readString();
        assertEquals("Bananas", res);
    }

    public void testWriteBytes() throws Exception
    {
View Full Code Here

Examples of org.apache.qpid.proton.TestDecoder.readString()

    @Test
    public void testStrings() throws IOException
    {
        TestDecoder d = createDecoder(getBytes("strings"));
        assertEquals(new Binary("abc\0defg".getBytes("UTF-8")), d.readBinary());
        assertEquals("abcdefg", d.readString());
        assertEquals(Symbol.valueOf("abcdefg"), d.readSymbol());
        assertEquals(new Binary(new byte[0]), d.readBinary());
        assertEquals("", d.readString());
        assertEquals(Symbol.valueOf(""), d.readSymbol());
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.readString()

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
        Assert.assertEquals( request.getId(), protocol.readI64() );

        if ( bis.markSupported() ) {
            bis.reset();
            bis.skip( headerLength );
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.readString()

  public static void testNakedString(String str) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeString(str);
    // System.out.println(buf.inspect());
    String out = proto.readString();
    if (!str.equals(out)) {
      throw new RuntimeException("String was supposed to be '" + str + "' but was '" + out + "'");
    }
  }
 
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readString()

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, BinaryAnnotation struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.key = iprot.readString();
        struct.setKeyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readBinary();
        struct.setValueIsSet(true);
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.