Java Code Examples for java.io.ObjectOutputStream#reset()
The following examples show how to use
java.io.ObjectOutputStream#reset() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProxyArrays.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Proxy[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 2
Source File: ExternObjTrees.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 3
Source File: CharArrays.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, char[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 4
Source File: CustomDefaultObjTrees.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 5
Source File: GetPutFieldTrees.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 6
Source File: LongArrays.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, long[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 7
Source File: ObjTrees.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 8
Source File: GetPutFieldTrees.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 9
Source File: ObjArrays.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 10
Source File: CustomObjTrees.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 11
Source File: LongArrays.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, long[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 12
Source File: ShortArrays.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, short[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 13
Source File: DoubleArrays.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, double[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 14
Source File: ShortArrays.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, short[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 15
Source File: LongArrays.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, long[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 16
Source File: CharArrays.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, char[][] arrays, int nbatches) throws Exception { int ncycles = arrays.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(arrays[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 17
Source File: Strings.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with given number of cycles * for each batch. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, String[] strs, int nbatches, int ncycles) throws Exception { for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(strs[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 18
Source File: CustomDefaultObjTrees.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Run benchmark for given number of batches, with each batch containing * the given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, Node[] trees, int nbatches) throws Exception { int ncycles = trees.length; for (int i = 0; i < nbatches; i++) { sbuf.reset(); oout.reset(); for (int j = 0; j < ncycles; j++) { oout.writeObject(trees[j]); } oout.flush(); for (int j = 0; j < ncycles; j++) { oin.readObject(); } } }
Example 19
Source File: ClassDesc.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Run benchmark for given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, ObjectStreamClass desc, int ncycles) throws Exception { for (int i = 0; i < ncycles; i++) { sbuf.reset(); oout.reset(); oout.writeObject(desc); oout.flush(); oin.readObject(); } }
Example 20
Source File: ClassDesc.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Run benchmark for given number of cycles. */ void doReps(ObjectOutputStream oout, ObjectInputStream oin, StreamBuffer sbuf, ObjectStreamClass desc, int ncycles) throws Exception { for (int i = 0; i < ncycles; i++) { sbuf.reset(); oout.reset(); oout.writeObject(desc); oout.flush(); oin.readObject(); } }