Package com.fasterxml.storemate.store.util

Examples of com.fasterxml.storemate.store.util.StuffToBytes$Writer


    public Storable encodeInlined(StorableKey key, long modtime,
            StorableCreationMetadata stdMetadata, ByteContainer customMetadata,
            ByteContainer inlineData)
    {
        StuffToBytes estimator = StuffToBytes.estimator();
        _encodeInlined(key, estimator, false,
                modtime, stdMetadata, customMetadata, inlineData);
        StuffToBytes writer = StuffToBytes.writer(estimator.offset());
        return _encodeInlined(key, writer, true,
                modtime, stdMetadata, customMetadata, inlineData);
    }
View Full Code Here


    public Storable encodeOfflined(StorableKey key,
            long modtime,
            StorableCreationMetadata stdMetadata, ByteContainer customMetadata,
            FileReference externalData)
    {
        StuffToBytes estimator = StuffToBytes.estimator();
        _encodeOfflined(key, estimator, false,
                modtime, stdMetadata, customMetadata, externalData);
        StuffToBytes writer = StuffToBytes.writer(estimator.offset());
        return _encodeOfflined(key, writer, true,
                modtime, stdMetadata, customMetadata, externalData);
    }
View Full Code Here

   *
   * @param context
   * @return
   */
  private static GeneratorResult execute(String grammarFile, final boolean forwardRef) {
    final Writer writer = new PrintWriter();
   
    // TODO: Fix this!
    ParsingSettings parsingSettings = new ParsingSettings() {
      @Override
      public boolean isForwardRef() {
        return forwardRef;
      }
    };
    grammarFile = Util.replaceSlash(grammarFile);
   
    writer.writeln("  Reading grammar \"" + grammarFile + "\"");
   
    GrammarParser parser = new GrammarParser(new IGrammarFactoryFactory() {
      public IGrammarFactory getFactory(int phase) {
        return new ParserFactory(writer);
      }}
View Full Code Here

      readers[i]=new Reader(pricesInfo);
      threadsReader[i]=new Thread(readers[i]);
    }
   
    // Creates a writer and a thread to run it
    Writer writer=new Writer(pricesInfo);
    Thread threadWriter=new Thread(writer);
   
    // Starts the threads
    for (int i=0; i<5; i++){
      threadsReader[i].start();
View Full Code Here

TOP

Related Classes of com.fasterxml.storemate.store.util.StuffToBytes$Writer

Copyright © 2018 www.massapicom. 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.