Examples of writeString()


Examples of org.apache.jackrabbit.core.journal.Record.writeString()

        Record record = null;
        boolean succeeded = false;

        try {
            record = journal.getProducer(PRODUCER_ID).append();
            record.writeString(null);
            write(record, oldPrefix, newPrefix, uri);
            record.writeChar('\0');
            record.update();
            setRevision(record.getRevision());
            succeeded = true;
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentWriter.writeString()

            // adding 15 strings with 16516 bytes each
            for (int k = 0; k < 15; k++) {
                // 16516 = (Segment.MEDIUM_LIMIT - 1 + 2 + 3)
                // 1 byte per char, 2 byte to store the length and 3 bytes for the
                // alignment to the integer boundary
                writer.writeString(Strings.repeat("abcdefghijklmno".substring(k, k + 1),
                        Segment.MEDIUM_LIMIT - 1));
            }

            // adding 14280 bytes. 1 byte per char, and 2 bytes to store the length
            RecordId x = writer.writeString(Strings.repeat("x", 14278));
View Full Code Here

Examples of org.apache.jute.BinaryOutputArchive.writeString()

     
      // fake messages from the server
      QuorumPacket qp = new QuorumPacket(Leader.SNAP, 0, null, null);
      oa.writeRecord(qp, null);
      sl.zk.getZKDatabase().serializeSnapshot(oa);
      oa.writeString("BenWasHere", "signature");
      TxnHeader hdr = new TxnHeader(0, 0, 0, 0, ZooDefs.OpCode.create);
      CreateTxn txn = new CreateTxn("/foo", new byte[0], new ArrayList<ACL>(), false, sl.zk.getZKDatabase().getNode("/").stat.getCversion());
          ByteArrayOutputStream tbaos = new ByteArrayOutputStream();
          BinaryOutputArchive boa = BinaryOutputArchive.getArchive(tbaos);
          hdr.serialize(boa, "hdr");
View Full Code Here

Examples of org.apache.jute.OutputArchive.writeString()

            OutputArchive oa = BinaryOutputArchive.getArchive(crcOut);
            FileHeader header = new FileHeader(SNAP_MAGIC, VERSION, dbId);
            serialize(dt,sessions,oa, header);
            long val = crcOut.getChecksum().getValue();
            oa.writeLong(val, "val");
            oa.writeString("/", "path");
            sessOS.flush();
            crcOut.close();
            sessOS.close();
        }
    }
View Full Code Here

Examples of org.apache.jute_voltpatches.OutputArchive.writeString()

            OutputArchive oa = BinaryOutputArchive.getArchive(crcOut);
            FileHeader header = new FileHeader(SNAP_MAGIC, VERSION, dbId);
            serialize(dt,sessions,oa, header);
            long val = crcOut.getChecksum().getValue();
            oa.writeLong(val, "val");
            oa.writeString("/", "path");
            sessOS.flush();
            crcOut.close();
            sessOS.close();
        }
    }
View Full Code Here

Examples of org.apache.lucene.store.ChecksumIndexOutput.writeString()

      segnOutput.writeLong(version);
      segnOutput.writeInt(counter); // write counter
      segnOutput.writeInt(size()); // write infos
      for (SegmentCommitInfo siPerCommit : this) {
        SegmentInfo si = siPerCommit.info;
        segnOutput.writeString(si.name);
        segnOutput.writeString(si.getCodec().getName());
        segnOutput.writeLong(siPerCommit.getDelGen());
        segnOutput.writeInt(siPerCommit.getDelCount());
        segnOutput.writeLong(siPerCommit.getFieldInfosGen());
        final Map<Long,Set<String>> genUpdatesFiles = siPerCommit.getUpdatesFiles();
View Full Code Here

Examples of org.apache.lucene.store.DataOutput.writeString()

          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]);
          out.writeString(data[2]);
        }
      }
    } finally {
View Full Code Here

Examples of org.apache.lucene.store.IndexOutput.writeString()

    if(d.fileExists("txid"))
    {
      d.deleteFile("txid");
    }
    IndexOutput out=d.createOutput("txid");
    out.writeString(String.valueOf(this.txid));
    out.close();
  }
 
 
 
View Full Code Here

Examples of org.apache.lucene.store.OutputStream.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.
            // Remeber the locations of each file's data section.
            byte buffer[] = new byte[1024];
View Full Code Here

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

          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]);
          out.writeString(data[2]);
        }
      }
    } finally {
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.