public class org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder extends org.apache.hc.core.http.impl.nio.AbstractContentEncoder implements org.apache.hc.core.http.nio.FileContentEncoder
{
private final long contentLength;
private final int fragHint;
private long remaining;
public void <init>(java.nio.channels.WritableByteChannel, org.apache.hc.core.http.nio.SessionOutputBuffer, org.apache.hc.core.http.impl.BasicHttpTransportMetrics, long, int)
{
int v, v;
java.nio.channels.WritableByteChannel v;
long v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
org.apache.hc.core.http.impl.BasicHttpTransportMetrics v;
org.apache.hc.core.http.nio.SessionOutputBuffer v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v := @parameter: java.nio.channels.WritableByteChannel;
v := @parameter: org.apache.hc.core.http.nio.SessionOutputBuffer;
v := @parameter: org.apache.hc.core.http.impl.BasicHttpTransportMetrics;
v := @parameter: long;
v := @parameter: int;
specialinvoke v.<org.apache.hc.core.http.impl.nio.AbstractContentEncoder: void <init>(java.nio.channels.WritableByteChannel,org.apache.hc.core.http.nio.SessionOutputBuffer,org.apache.hc.core.http.impl.BasicHttpTransportMetrics)>(v, v, v);
staticinvoke <org.apache.hc.core.util.Args: long notNegative(long,java.lang.String)>(v, "Content length");
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long contentLength> = v;
if v <= 0 goto label;
v = v;
goto label;
label:
v = 0;
label:
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint> = v;
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining> = v;
return;
}
public void <init>(java.nio.channels.WritableByteChannel, org.apache.hc.core.http.nio.SessionOutputBuffer, org.apache.hc.core.http.impl.BasicHttpTransportMetrics, long)
{
java.nio.channels.WritableByteChannel v;
long v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
org.apache.hc.core.http.impl.BasicHttpTransportMetrics v;
org.apache.hc.core.http.nio.SessionOutputBuffer v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v := @parameter: java.nio.channels.WritableByteChannel;
v := @parameter: org.apache.hc.core.http.nio.SessionOutputBuffer;
v := @parameter: org.apache.hc.core.http.impl.BasicHttpTransportMetrics;
v := @parameter: long;
specialinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: void <init>(java.nio.channels.WritableByteChannel,org.apache.hc.core.http.nio.SessionOutputBuffer,org.apache.hc.core.http.impl.BasicHttpTransportMetrics,long,int)>(v, v, v, v, 0);
return;
}
private int nextChunk(java.nio.ByteBuffer)
{
int v;
long v, v, v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
java.nio.ByteBuffer v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v := @parameter: java.nio.ByteBuffer;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = staticinvoke <java.lang.Math: long min(long,long)>(v, 2147483647L);
v = virtualinvoke v.<java.nio.ByteBuffer: int remaining()>();
v = staticinvoke <java.lang.Math: long min(long,long)>(v, v);
return v;
}
public int write(java.nio.ByteBuffer) throws java.io.IOException
{
java.nio.ByteBuffer v;
byte v, v;
boolean v, v, v, v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
long v, v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.hc.core.http.nio.SessionOutputBuffer v, v, v, v, v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v := @parameter: java.nio.ByteBuffer;
if v != null goto label;
return 0;
label:
virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: void assertNotCompleted()>();
v = 0;
label:
v = virtualinvoke v.<java.nio.ByteBuffer: boolean hasRemaining()>();
if v == 0 goto label;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v cmp 0L;
if v <= 0 goto label;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: boolean hasData()>();
if v != 0 goto label;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint>;
if v <= 0 goto label;
label:
v = specialinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int nextChunk(java.nio.ByteBuffer)>(v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint>;
if v > v goto label;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint>;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: int length()>();
v = v - v;
if v <= 0 goto label;
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
v = virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int writeToBuffer(java.nio.ByteBuffer,int)>(v, v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v - v;
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining> = v;
v = v + v;
label:
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: boolean hasData()>();
if v == 0 goto label;
v = specialinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int nextChunk(java.nio.ByteBuffer)>(v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: int length()>();
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint>;
if v >= v goto label;
if v <= 0 goto label;
label:
v = virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int flushToChannel()>();
if v == 0 goto label;
label:
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: boolean hasData()>();
if v != 0 goto label;
v = specialinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int nextChunk(java.nio.ByteBuffer)>(v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int fragHint>;
if v <= v goto label;
v = virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int writeToChannel(java.nio.ByteBuffer,int)>(v, v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v - v;
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining> = v;
v = v + v;
if v != 0 goto label;
label:
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v cmp 0L;
if v > 0 goto label;
specialinvoke v.<org.apache.hc.core.http.impl.nio.AbstractContentEncoder: void complete(java.util.List)>(null);
label:
return v;
}
public long transfer(java.nio.channels.FileChannel, long, long) throws java.io.IOException
{
long v, v, v, v, v, v, v, v;
org.apache.hc.core.http.impl.BasicHttpTransportMetrics v;
byte v, v;
org.apache.hc.core.http.nio.SessionOutputBuffer v;
boolean v;
java.nio.channels.WritableByteChannel v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
java.nio.channels.FileChannel v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v := @parameter: java.nio.channels.FileChannel;
v := @parameter: long;
v := @parameter: long;
if v != null goto label;
return 0L;
label:
virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: void assertNotCompleted()>();
virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: int flushToChannel()>();
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.nio.SessionOutputBuffer buffer>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.SessionOutputBuffer: boolean hasData()>();
if v == 0 goto label;
return 0L;
label:
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = staticinvoke <java.lang.Math: long min(long,long)>(v, v);
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: java.nio.channels.WritableByteChannel channel>;
v = virtualinvoke v.<java.nio.channels.FileChannel: long transferTo(long,long,java.nio.channels.WritableByteChannel)>(v, v, v);
v = v cmp 0L;
if v <= 0 goto label;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: org.apache.hc.core.http.impl.BasicHttpTransportMetrics metrics>;
virtualinvoke v.<org.apache.hc.core.http.impl.BasicHttpTransportMetrics: void incrementBytesTransferred(long)>(v);
label:
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v - v;
v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining> = v;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v cmp 0L;
if v > 0 goto label;
specialinvoke v.<org.apache.hc.core.http.impl.nio.AbstractContentEncoder: void complete(java.util.List)>(null);
label:
return v;
}
public java.lang.String toString()
{
long v, v, v, v;
java.lang.StringBuilder v;
org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder v;
java.lang.String v;
boolean v;
v := @this: org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder;
v = new java.lang.StringBuilder;
specialinvoke v.<java.lang.StringBuilder: void <init>()>();
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("[content length: ");
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long contentLength>;
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(long)>(v);
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("; pos: ");
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long contentLength>;
v = v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: long remaining>;
v = v - v;
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(long)>(v);
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("; completed: ");
v = virtualinvoke v.<org.apache.hc.core.http.impl.nio.LengthDelimitedEncoder: boolean isCompleted()>();
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(boolean)>(v);
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>("]");
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.String toString()>();
return v;
}
}