public class org.jboss.resteasy.mock.MockHttpResponse implements org.jboss.resteasy.spi.HttpResponse
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jboss.resteasy.mock.MockHttpResponse
super_class: java.lang.Object
{
private static final java.lang.String CHARSET_PREFIX;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "charset="
protected int status;
descriptor: I
flags: (0x0004) ACC_PROTECTED
protected java.io.ByteArrayOutputStream baos;
descriptor: Ljava/io/ByteArrayOutputStream;
flags: (0x0004) ACC_PROTECTED
protected java.io.OutputStream os;
descriptor: Ljava/io/OutputStream;
flags: (0x0004) ACC_PROTECTED
protected org.jboss.resteasy.util.CaseInsensitiveMap ;
descriptor: Lorg/jboss/resteasy/util/CaseInsensitiveMap;
flags: (0x0004) ACC_PROTECTED
protected java.util.List<javax.ws.rs.core.NewCookie> newCookies;
descriptor: Ljava/util/List;
flags: (0x0004) ACC_PROTECTED
Signature: Ljava/util/List<Ljavax/ws/rs/core/NewCookie;>;
protected java.lang.String errorMessage;
descriptor: Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
protected boolean sentError;
descriptor: Z
flags: (0x0004) ACC_PROTECTED
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
2: aload 0
aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
putfield org.jboss.resteasy.mock.MockHttpResponse.os:Ljava/io/OutputStream;
3: aload 0
new org.jboss.resteasy.util.CaseInsensitiveMap
dup
invokespecial org.jboss.resteasy.util.CaseInsensitiveMap.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.outputHeaders:Lorg/jboss/resteasy/util/CaseInsensitiveMap;
4: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.newCookies:Ljava/util/List;
5: aload 0
iconst_0
putfield org.jboss.resteasy.mock.MockHttpResponse.sentError:Z
6: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public int getStatus();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.status:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public void setStatus(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.jboss.resteasy.mock.MockHttpResponse.status:I
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
0 2 1 status I
MethodParameters:
Name Flags
status
public javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object> getOutputHeaders();
descriptor: ()Ljavax/ws/rs/core/MultivaluedMap;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.outputHeaders:Lorg/jboss/resteasy/util/CaseInsensitiveMap;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
Signature: ()Ljavax/ws/rs/core/MultivaluedMap<Ljava/lang/String;Ljava/lang/Object;>;
public java.io.OutputStream getOutputStream();
descriptor: ()Ljava/io/OutputStream;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.os:Ljava/io/OutputStream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
Exceptions:
throws java.io.IOException
public void setOutputStream(java.io.OutputStream);
descriptor: (Ljava/io/OutputStream;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.jboss.resteasy.mock.MockHttpResponse.os:Ljava/io/OutputStream;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
0 2 1 os Ljava/io/OutputStream;
MethodParameters:
Name Flags
os
public byte[] getOutput();
descriptor: ()[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public java.lang.String getContentAsString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual org.jboss.resteasy.mock.MockHttpResponse.getCharset:()Ljava/lang/String;
astore 1
start local 1 1: aload 1
ifnonnull 2
aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
invokevirtual java.io.ByteArrayOutputStream.toString:()Ljava/lang/String;
goto 3
StackMap locals: java.lang.String
StackMap stack:
2: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
aload 1
invokevirtual java.io.ByteArrayOutputStream.toString:(Ljava/lang/String;)Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
3: areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
1 4 1 charset Ljava/lang/String;
Exceptions:
throws java.io.UnsupportedEncodingException
private java.lang.String getCharset();
descriptor: ()Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=6, args_size=1
start local 0 0: aconst_null
astore 1
start local 1 1: aload 0
invokevirtual org.jboss.resteasy.mock.MockHttpResponse.getOutputHeaders:()Ljavax/ws/rs/core/MultivaluedMap;
astore 2
start local 2 2: aload 2
ldc "Content-Type"
invokeinterface javax.ws.rs.core.MultivaluedMap.getFirst:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
start local 3 3: aconst_null
astore 4
start local 4 4: aload 3
instanceof javax.ws.rs.core.MediaType
ifeq 7
5: aload 3
checkcast javax.ws.rs.core.MediaType
invokevirtual javax.ws.rs.core.MediaType.toString:()Ljava/lang/String;
astore 4
6: goto 8
7: StackMap locals: org.jboss.resteasy.mock.MockHttpResponse java.lang.String javax.ws.rs.core.MultivaluedMap java.lang.Object java.lang.String
StackMap stack:
aload 3
checkcast java.lang.String
astore 4
8: StackMap locals:
StackMap stack:
aload 4
ifnull 12
aload 4
invokevirtual java.lang.String.isEmpty:()Z
ifne 12
9: aload 4
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "charset="
invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
istore 5
start local 5 10: iload 5
iconst_m1
if_icmpeq 12
11: aload 4
iload 5
ldc "charset="
invokevirtual java.lang.String.length:()I
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 1
end local 5 12: StackMap locals:
StackMap stack:
aload 1
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
1 13 1 characterEncoding Ljava/lang/String;
2 13 2 headers Ljavax/ws/rs/core/MultivaluedMap<Ljava/lang/String;Ljava/lang/Object;>;
3 13 3 obj Ljava/lang/Object;
4 13 4 value Ljava/lang/String;
10 12 5 charsetIndex I
public void addNewCookie(javax.ws.rs.core.NewCookie);
descriptor: (Ljavax/ws/rs/core/NewCookie;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.newCookies:Ljava/util/List;
aload 1
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
0 2 1 cookie Ljavax/ws/rs/core/NewCookie;
MethodParameters:
Name Flags
cookie
public void sendError(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iconst_1
putfield org.jboss.resteasy.mock.MockHttpResponse.sentError:Z
1: aload 0
iload 1
putfield org.jboss.resteasy.mock.MockHttpResponse.status:I
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
0 3 1 status I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
status
public void sendError(int, java.lang.String);
descriptor: (ILjava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iconst_1
putfield org.jboss.resteasy.mock.MockHttpResponse.sentError:Z
1: aload 0
iload 1
putfield org.jboss.resteasy.mock.MockHttpResponse.status:I
2: aload 0
aload 2
putfield org.jboss.resteasy.mock.MockHttpResponse.errorMessage:Ljava/lang/String;
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
0 4 1 status I
0 4 2 message Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
status
message
public java.util.List<javax.ws.rs.core.NewCookie> getNewCookies();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.newCookies:Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
Signature: ()Ljava/util/List<Ljavax/ws/rs/core/NewCookie;>;
public java.lang.String getErrorMessage();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.errorMessage:Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public boolean isErrorSent();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.sentError:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public boolean isCommitted();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
invokevirtual java.io.ByteArrayOutputStream.size:()I
ifle 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public void reset();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new java.io.ByteArrayOutputStream
dup
invokespecial java.io.ByteArrayOutputStream.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
1: aload 0
aload 0
getfield org.jboss.resteasy.mock.MockHttpResponse.baos:Ljava/io/ByteArrayOutputStream;
putfield org.jboss.resteasy.mock.MockHttpResponse.os:Ljava/io/OutputStream;
2: aload 0
new org.jboss.resteasy.util.CaseInsensitiveMap
dup
invokespecial org.jboss.resteasy.util.CaseInsensitiveMap.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.outputHeaders:Lorg/jboss/resteasy/util/CaseInsensitiveMap;
3: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield org.jboss.resteasy.mock.MockHttpResponse.newCookies:Ljava/util/List;
4: aload 0
iconst_0
putfield org.jboss.resteasy.mock.MockHttpResponse.sentError:Z
5: aload 0
iconst_0
putfield org.jboss.resteasy.mock.MockHttpResponse.status:I
6: aload 0
aconst_null
putfield org.jboss.resteasy.mock.MockHttpResponse.errorMessage:Ljava/lang/String;
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
public void flushBuffer();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jboss/resteasy/mock/MockHttpResponse;
Exceptions:
throws java.io.IOException
}
SourceFile: "MockHttpResponse.java"