All pastes #334123 Raw Edit

Miscellany

public java v1 · immutable
#334123 ·published 2007-01-31 11:24 UTC
rendered paste body
import java.util.zip.DataFormatException;import java.util.zip.Deflater;public class typedef extends RuntimeException {    private static final long serialVersionUID = -1876647816524051977L;    public static void main(String[] String) throws AbstractMethodError,            ThreadDeath, typedef, VirtualMachineError, DataFormatException {        int t = 0x7FFFFFFF;        while (true) {            try {                byte[] B = new byte[t = (int) Math.round(t * 0.9)];                System.err.println("UnCompressed=" + B.length);                byte[] output = new byte[1000000];                Deflater compresser = new Deflater();                compresser.setInput(B);                compresser.finish();                int compressedDataLength = compresser.deflate(output);                System.err.println("Compressed=" + compressedDataLength);                throw new typedef();            } catch (OutOfMemoryError e) {                System.gc();                continue;            }        }    }    public String toString() {        throw new UnsupportedOperationException();    }}