public class org.apache.commons.io.output.ThresholdingOutputStream extends java.io.OutputStream
{
private static final org.apache.commons.io.function.IOFunction NOOP_OS_GETTER;
private final int threshold;
private final org.apache.commons.io.function.IOConsumer thresholdConsumer;
private final org.apache.commons.io.function.IOFunction outputStreamGetter;
private long written;
private boolean thresholdExceeded;
public void <init>(int)
{
int v;
org.apache.commons.io.function.IOConsumer v;
org.apache.commons.io.output.ThresholdingOutputStream v;
org.apache.commons.io.function.IOFunction v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: int;
v = staticinvoke <org.apache.commons.io.function.IOConsumer: org.apache.commons.io.function.IOConsumer noop()>();
v = <org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOFunction NOOP_OS_GETTER>;
specialinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void <init>(int,org.apache.commons.io.function.IOConsumer,org.apache.commons.io.function.IOFunction)>(v, v, v);
return;
}
public void <init>(int, org.apache.commons.io.function.IOConsumer, org.apache.commons.io.function.IOFunction)
{
int v;
org.apache.commons.io.function.IOConsumer v, v;
org.apache.commons.io.output.ThresholdingOutputStream v;
org.apache.commons.io.function.IOFunction v, v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: int;
v := @parameter: org.apache.commons.io.function.IOConsumer;
v := @parameter: org.apache.commons.io.function.IOFunction;
specialinvoke v.<java.io.OutputStream: void <init>()>();
v.<org.apache.commons.io.output.ThresholdingOutputStream: int threshold> = v;
if v != null goto label;
v = staticinvoke <org.apache.commons.io.function.IOConsumer: org.apache.commons.io.function.IOConsumer noop()>();
goto label;
label:
v = v;
label:
v.<org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOConsumer thresholdConsumer> = v;
if v != null goto label;
v = <org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOFunction NOOP_OS_GETTER>;
goto label;
label:
v = v;
label:
v.<org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOFunction outputStreamGetter> = v;
return;
}
protected void checkThreshold(int) throws java.io.IOException
{
byte v;
int v, v;
long v, v;
org.apache.commons.io.output.ThresholdingOutputStream v;
boolean v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: int;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: boolean thresholdExceeded>;
if v != 0 goto label;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
v = v + v;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: int threshold>;
v = v cmp v;
if v <= 0 goto label;
v.<org.apache.commons.io.output.ThresholdingOutputStream: boolean thresholdExceeded> = 1;
virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void thresholdReached()>();
label:
return;
}
public void close() throws java.io.IOException
{
java.io.OutputStream v;
java.io.IOException v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
label:
virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void flush()>();
label:
goto label;
label:
v := @caughtexception;
label:
v = virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: java.io.OutputStream getStream()>();
virtualinvoke v.<java.io.OutputStream: void close()>();
return;
catch java.io.IOException from label to label with label;
}
public void flush() throws java.io.IOException
{
java.io.OutputStream v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: java.io.OutputStream getStream()>();
virtualinvoke v.<java.io.OutputStream: void flush()>();
return;
}
public long getByteCount()
{
long v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
return v;
}
protected java.io.OutputStream getStream() throws java.io.IOException
{
java.lang.Object v;
org.apache.commons.io.output.ThresholdingOutputStream v;
org.apache.commons.io.function.IOFunction v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOFunction outputStreamGetter>;
v = interfaceinvoke v.<org.apache.commons.io.function.IOFunction: java.lang.Object apply(java.lang.Object)>(v);
return v;
}
public int getThreshold()
{
int v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: int threshold>;
return v;
}
public boolean isThresholdExceeded()
{
byte v;
int v;
long v;
org.apache.commons.io.output.ThresholdingOutputStream v;
boolean v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: int threshold>;
v = v cmp v;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
protected void resetByteCount()
{
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v.<org.apache.commons.io.output.ThresholdingOutputStream: boolean thresholdExceeded> = 0;
v.<org.apache.commons.io.output.ThresholdingOutputStream: long written> = 0L;
return;
}
protected void setByteCount(long)
{
long v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: long;
v.<org.apache.commons.io.output.ThresholdingOutputStream: long written> = v;
return;
}
protected void thresholdReached() throws java.io.IOException
{
org.apache.commons.io.function.IOConsumer v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOConsumer thresholdConsumer>;
interfaceinvoke v.<org.apache.commons.io.function.IOConsumer: void accept(java.lang.Object)>(v);
return;
}
public void write(byte[]) throws java.io.IOException
{
java.io.OutputStream v;
byte[] v;
int v, v;
long v, v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: byte[];
v = lengthof v;
virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void checkThreshold(int)>(v);
v = virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: java.io.OutputStream getStream()>();
virtualinvoke v.<java.io.OutputStream: void write(byte[])>(v);
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
v = lengthof v;
v = v + v;
v.<org.apache.commons.io.output.ThresholdingOutputStream: long written> = v;
return;
}
public void write(byte[], int, int) throws java.io.IOException
{
java.io.OutputStream v;
byte[] v;
int v, v;
long v, v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void checkThreshold(int)>(v);
v = virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: java.io.OutputStream getStream()>();
virtualinvoke v.<java.io.OutputStream: void write(byte[],int,int)>(v, v, v);
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
v = v + v;
v.<org.apache.commons.io.output.ThresholdingOutputStream: long written> = v;
return;
}
public void write(int) throws java.io.IOException
{
java.io.OutputStream v;
int v;
long v, v;
org.apache.commons.io.output.ThresholdingOutputStream v;
v := @this: org.apache.commons.io.output.ThresholdingOutputStream;
v := @parameter: int;
virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: void checkThreshold(int)>(1);
v = virtualinvoke v.<org.apache.commons.io.output.ThresholdingOutputStream: java.io.OutputStream getStream()>();
virtualinvoke v.<java.io.OutputStream: void write(int)>(v);
v = v.<org.apache.commons.io.output.ThresholdingOutputStream: long written>;
v = v + 1L;
v.<org.apache.commons.io.output.ThresholdingOutputStream: long written> = v;
return;
}
static void <clinit>()
{
org.apache.commons.io.function.IOFunction v;
v = staticinvoke <org.apache.commons.io.output.ThresholdingOutputStream$lambda_static_0__263: org.apache.commons.io.function.IOFunction bootstrap$()>();
<org.apache.commons.io.output.ThresholdingOutputStream: org.apache.commons.io.function.IOFunction NOOP_OS_GETTER> = v;
return;
}
}