public class org.apache.hc.core.http.nio.entity.DigestingEntityConsumer extends java.lang.Object implements org.apache.hc.core.http.nio.AsyncEntityConsumer
{
private final org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped;
private final java.util.List trailers;
private final java.security.MessageDigest digester;
private volatile byte[] digest;
public void <init>(java.lang.String, org.apache.hc.core.http.nio.AsyncEntityConsumer) throws java.security.NoSuchAlgorithmException
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
java.security.MessageDigest v;
java.lang.Object v;
java.lang.String v;
java.util.ArrayList v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: java.lang.String;
v := @parameter: org.apache.hc.core.http.nio.AsyncEntityConsumer;
specialinvoke v.<java.lang.Object: void <init>()>();
v = staticinvoke <org.apache.hc.core.util.Args: java.lang.Object notNull(java.lang.Object,java.lang.String)>(v, "Entity consumer");
v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped> = v;
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.util.List trailers> = v;
v = staticinvoke <java.security.MessageDigest: java.security.MessageDigest getInstance(java.lang.String)>(v);
v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.security.MessageDigest digester> = v;
return;
}
public void streamStart(org.apache.hc.core.http.EntityDetails, org.apache.hc.core.concurrent.FutureCallback) throws java.io.IOException, org.apache.hc.core.http.HttpException
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
org.apache.hc.core.concurrent.FutureCallback v;
org.apache.hc.core.http.EntityDetails v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: org.apache.hc.core.http.EntityDetails;
v := @parameter: org.apache.hc.core.concurrent.FutureCallback;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void streamStart(org.apache.hc.core.http.EntityDetails,org.apache.hc.core.concurrent.FutureCallback)>(v, v);
return;
}
public void updateCapacity(org.apache.hc.core.http.nio.CapacityChannel) throws java.io.IOException
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
org.apache.hc.core.http.nio.CapacityChannel v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: org.apache.hc.core.http.nio.CapacityChannel;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void updateCapacity(org.apache.hc.core.http.nio.CapacityChannel)>(v);
return;
}
public void consume(java.nio.ByteBuffer) throws java.io.IOException
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
java.security.MessageDigest v;
java.nio.ByteBuffer v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: java.nio.ByteBuffer;
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer mark()>();
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.security.MessageDigest digester>;
virtualinvoke v.<java.security.MessageDigest: void update(java.nio.ByteBuffer)>(v);
virtualinvoke v.<java.nio.ByteBuffer: java.nio.ByteBuffer reset()>();
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void consume(java.nio.ByteBuffer)>(v);
return;
}
public void streamEnd(java.util.List) throws org.apache.hc.core.http.HttpException, java.io.IOException
{
byte[] v;
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
java.util.List v, v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
java.security.MessageDigest v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: java.util.List;
if v == null goto label;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.util.List trailers>;
interfaceinvoke v.<java.util.List: boolean addAll(java.util.Collection)>(v);
label:
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.security.MessageDigest digester>;
v = virtualinvoke v.<java.security.MessageDigest: byte[] digest()>();
v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: byte[] digest> = v;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void streamEnd(java.util.List)>(v);
return;
}
public void failed(java.lang.Exception)
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
java.lang.Exception v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v := @parameter: java.lang.Exception;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void failed(java.lang.Exception)>(v);
return;
}
public java.lang.Object getContent()
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
java.lang.Object v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
v = interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: java.lang.Object getContent()>();
return v;
}
public void releaseResources()
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
org.apache.hc.core.http.nio.AsyncEntityConsumer v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: org.apache.hc.core.http.nio.AsyncEntityConsumer wrapped>;
interfaceinvoke v.<org.apache.hc.core.http.nio.AsyncEntityConsumer: void releaseResources()>();
return;
}
public java.util.List getTrailers()
{
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
java.util.List v, v;
java.util.ArrayList v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.util.List trailers>;
if v == null goto label;
v = new java.util.ArrayList;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: java.util.List trailers>;
specialinvoke v.<java.util.ArrayList: void <init>(java.util.Collection)>(v);
goto label;
label:
v = null;
label:
return v;
}
public byte[] getDigest()
{
byte[] v;
org.apache.hc.core.http.nio.entity.DigestingEntityConsumer v;
v := @this: org.apache.hc.core.http.nio.entity.DigestingEntityConsumer;
v = v.<org.apache.hc.core.http.nio.entity.DigestingEntityConsumer: byte[] digest>;
return v;
}
}