Package org.apache.lucene.store

Examples of org.apache.lucene.store.OutputStreamDataOutput.writeByte()


      final DataOutput out = new OutputStreamDataOutput(os);
      CodecUtil.writeHeader(out, BinaryDictionary.POSDICT_HEADER, BinaryDictionary.VERSION);
      out.writeVInt(posDict.size());
      for (String s : posDict) {
        if (s == null) {
          out.writeByte((byte)0);
          out.writeByte((byte)0);
          out.writeByte((byte)0);
        } else {
          String data[] = CSVUtil.parse(s);
          assert data.length == 3 : "malformed pos/inflection: " + s;
View Full Code Here


      CodecUtil.writeHeader(out, BinaryDictionary.POSDICT_HEADER, BinaryDictionary.VERSION);
      out.writeVInt(posDict.size());
      for (String s : posDict) {
        if (s == null) {
          out.writeByte((byte)0);
          out.writeByte((byte)0);
          out.writeByte((byte)0);
        } else {
          String data[] = CSVUtil.parse(s);
          assert data.length == 3 : "malformed pos/inflection: " + s;
          out.writeString(data[0]);
View Full Code Here

      out.writeVInt(posDict.size());
      for (String s : posDict) {
        if (s == null) {
          out.writeByte((byte)0);
          out.writeByte((byte)0);
          out.writeByte((byte)0);
        } else {
          String data[] = CSVUtil.parse(s);
          assert data.length == 3 : "malformed pos/inflection: " + s;
          out.writeString(data[0]);
          out.writeString(data[1]);
View Full Code Here

  @Override
  public boolean store(OutputStream output) throws IOException {
    DataOutput out = new OutputStreamDataOutput(output);
    CodecUtil.writeHeader(out, CODEC_NAME, VERSION_CURRENT);
    out.writeByte(separator);
    out.writeVInt(grams);
    out.writeVLong(totTokens);
    fst.save(out);
    return true;
  }
View Full Code Here

        return false;
      }

      fst.save(dataOut);
      dataOut.writeVInt(maxAnalyzedPathsForOneInput);
      dataOut.writeByte((byte) (hasPayloads ? 1 : 0));
    } finally {
      IOUtils.close(output);
    }
    return true;
  }
View Full Code Here

        return false;
      }

      fst.save(dataOut);
      dataOut.writeVInt(maxAnalyzedPathsForOneInput);
      dataOut.writeByte((byte) (hasPayloads ? 1 : 0));
    } finally {
      IOUtils.close(output);
    }
    return true;
  }
View Full Code Here

        return false;
      }

      fst.save(dataOut);
      dataOut.writeVInt(maxAnalyzedPathsForOneInput);
      dataOut.writeByte((byte) (hasPayloads ? 1 : 0));
    } finally {
      IOUtils.close(output);
    }
    return true;
  }
View Full Code Here

        return false;
      }

      fst.save(dataOut);
      dataOut.writeVInt(maxAnalyzedPathsForOneInput);
      dataOut.writeByte((byte) (hasPayloads ? 1 : 0));
    } finally {
      IOUtils.close(output);
    }
    return true;
  }
View Full Code Here

      final DataOutput out = new OutputStreamDataOutput(os);
      CodecUtil.writeHeader(out, BinaryDictionary.POSDICT_HEADER, BinaryDictionary.VERSION);
      out.writeVInt(posDict.size());
      for (String s : posDict) {
        if (s == null) {
          out.writeByte((byte)0);
          out.writeByte((byte)0);
          out.writeByte((byte)0);
        } else {
          String data[] = CSVUtil.parse(s);
          assert data.length == 3 : "malformed pos/inflection: " + s;
View Full Code Here

      CodecUtil.writeHeader(out, BinaryDictionary.POSDICT_HEADER, BinaryDictionary.VERSION);
      out.writeVInt(posDict.size());
      for (String s : posDict) {
        if (s == null) {
          out.writeByte((byte)0);
          out.writeByte((byte)0);
          out.writeByte((byte)0);
        } else {
          String data[] = CSVUtil.parse(s);
          assert data.length == 3 : "malformed pos/inflection: " + s;
          out.writeString(data[0]);
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.