Package java.io

Examples of java.io.ObjectOutputStream.reset()


            logger.error("Exception when creating writer sending object: " + object, e);
            return false;
        }

        try {
            writer.reset();
            writer.flush();
            writer.writeObject(object);
            writer.flush();

            return true;
View Full Code Here


        ObjectOutputStream oout = this.oout;
        if (resetInterval != 0) {
            // Resetting will prevent OOM on the receiving side.
            writtenObjects ++;
            if (writtenObjects % resetInterval == 0) {
                oout.reset();

                // Also discard the byproduct to avoid OOM on the sending side.
                buffer.discardReadBytes();
            }
        }
View Full Code Here

                        }
                    }
                }

                // reset the temporary buffer for the next round
                test_objOut.reset();
            }

            // put the end-of-marker in the stream
            out.writeObject(LAST_ENTRY);
            savedListSize++;
View Full Code Here

                        }
                    }
                }

                // reset the temporary buffer for the next round
                pair_objOut.reset();
            }

            // write out a marker for the end of list
            out.writeObject(LAST_ENTRY);
            savedListSize++;
View Full Code Here

                        }
                    }
                }

                // reset the temporary buffer for the next round
                test_objOut.reset();
            }

            // put the end-of-marker in the stream
            out.writeObject(LAST_ENTRY);
            savedListSize++;
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.