net.clementlevallois.utils.DebuggingOutputStream Maven / Gradle / Ivy
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package net.clementlevallois.utils;
/**
*
* @author LEVALLOIS
*/
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.List;
import java.util.ArrayList;
/**
*
* @author LEVALLOIS
*/
public class DebuggingOutputStream
extends ObjectOutputStream {
private static final Field DEPTH_FIELD;
static {
try {
DEPTH_FIELD = ObjectOutputStream.class
.getDeclaredField("depth");
DEPTH_FIELD.setAccessible(true);
} catch (NoSuchFieldException e) {
throw new AssertionError(e);
}
}
final List