/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }
/** * Dumps the parameter {@code obj} only if it is {@code null} * or an object that has already been dumped previously. * * @param obj * Object to check if an instance previously dumped by this * stream. * @return -1 if it is an instance which has not been dumped yet (and this * method does nothing). The handle if {@code obj} is an * instance which has been dumped already. * * @throws IOException * If an error occurs attempting to save {@code null} or * a cyclic reference. */ private int dumpCycle(Object obj) throws IOException { // If the object has been saved already, save its handle only int handle = objectsWritten.get(obj); if (handle != -1) { writeCyclicReference(handle); return handle; } return -1; }