Examples of endChunks()


Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    try {
      deflaterStream.finish();
    } catch (IOException ex) {
      throw new KryoException(ex);
    }
    outputChunked.endChunks();
  }

  public Object read (Kryo kryo, Input input, Class type) {
    // The inflater would read from input beyond the compressed bytes if chunked enoding wasn't used.
    InflaterInputStream inflaterStream = new InflaterInputStream(new InputChunked(input, 256), new Inflater(noHeaders));
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    }

    OutputChunked outputChunked = new OutputChunked(output, 1024);
    for (int i = 0, n = fields.length; i < n; i++) {
      fields[i].write(outputChunked, object);
      outputChunked.endChunks();
    }
  }

  public T read (Kryo kryo, Input input, Class<T> type) {
    T object = create(kryo, input, type);
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

  public void testChunks () {
    Output output = new Output(512);
    output.writeInt(1234);
    OutputChunked outputChunked = new OutputChunked(output);
    outputChunked.writeInt(1);
    outputChunked.endChunks();
    outputChunked.writeInt(2);
    outputChunked.endChunks();
    outputChunked.writeInt(3);
    outputChunked.endChunks();
    outputChunked.writeInt(4);
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    output.writeInt(1234);
    OutputChunked outputChunked = new OutputChunked(output);
    outputChunked.writeInt(1);
    outputChunked.endChunks();
    outputChunked.writeInt(2);
    outputChunked.endChunks();
    outputChunked.writeInt(3);
    outputChunked.endChunks();
    outputChunked.writeInt(4);
    outputChunked.endChunks();
    outputChunked.writeInt(5);
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    outputChunked.writeInt(1);
    outputChunked.endChunks();
    outputChunked.writeInt(2);
    outputChunked.endChunks();
    outputChunked.writeInt(3);
    outputChunked.endChunks();
    outputChunked.writeInt(4);
    outputChunked.endChunks();
    outputChunked.writeInt(5);
    outputChunked.endChunks();
    output.writeInt(5678);
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    outputChunked.writeInt(2);
    outputChunked.endChunks();
    outputChunked.writeInt(3);
    outputChunked.endChunks();
    outputChunked.writeInt(4);
    outputChunked.endChunks();
    outputChunked.writeInt(5);
    outputChunked.endChunks();
    output.writeInt(5678);
    output.close();
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

    outputChunked.writeInt(3);
    outputChunked.endChunks();
    outputChunked.writeInt(4);
    outputChunked.endChunks();
    outputChunked.writeInt(5);
    outputChunked.endChunks();
    output.writeInt(5678);
    output.close();

    Input input = new Input(output.getBuffer());
    assertEquals(1234, input.readInt());
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

        if (TRACE) trace("kryo", "Write field: " + cachedField + " (" + object.getClass().getName() + ")");

        Object value = cachedField.get(object);
        if (value == null) {
          kryo.writeClass(outputChunked, null);
          outputChunked.endChunks();
          continue;
        }

        Serializer serializer = cachedField.serializer;
        if (cachedField.valueClass == null) {
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

            }
            kryo.writeObject(outputChunked, value, serializer);
          }
        }

        outputChunked.endChunks();
      } catch (IllegalAccessException ex) {
        throw new KryoException("Error accessing field: " + cachedField + " (" + object.getClass().getName() + ")", ex);
      } catch (KryoException ex) {
        ex.addTrace(cachedField + " (" + object.getClass().getName() + ")");
        throw ex;
View Full Code Here

Examples of com.esotericsoftware.kryo.io.OutputChunked.endChunks()

        if (TRACE) trace("kryo", "Write field: " + cachedField + " (" + object.getClass().getName() + ")");

        Object value = cachedField.get(object);
        if (value == null) {
          kryo.writeClass(outputChunked, null);
          outputChunked.endChunks();
          continue;
        }

        Serializer serializer = cachedField.serializer;
        if (cachedField.fieldClass == null) {
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.