public class org.springframework.http.converter.StringHttpMessageConverter extends org.springframework.http.converter.AbstractHttpMessageConverter<java.lang.String>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.springframework.http.converter.StringHttpMessageConverter
super_class: org.springframework.http.converter.AbstractHttpMessageConverter
{
public static final java.nio.charset.Charset DEFAULT_CHARSET;
descriptor: Ljava/nio/charset/Charset;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private volatile java.util.List<java.nio.charset.Charset> availableCharsets;
descriptor: Ljava/util/List;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
Signature: Ljava/util/List<Ljava/nio/charset/Charset;>;
RuntimeVisibleAnnotations:
org.springframework.lang.Nullable()
private boolean writeAcceptCharset;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic java.nio.charset.StandardCharsets.ISO_8859_1:Ljava/nio/charset/Charset;
putstatic org.springframework.http.converter.StringHttpMessageConverter.DEFAULT_CHARSET:Ljava/nio/charset/Charset;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getstatic org.springframework.http.converter.StringHttpMessageConverter.DEFAULT_CHARSET:Ljava/nio/charset/Charset;
invokespecial org.springframework.http.converter.StringHttpMessageConverter.<init>:(Ljava/nio/charset/Charset;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
public void <init>(java.nio.charset.Charset);
descriptor: (Ljava/nio/charset/Charset;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_2
anewarray org.springframework.http.MediaType
dup
iconst_0
getstatic org.springframework.http.MediaType.TEXT_PLAIN:Lorg/springframework/http/MediaType;
aastore
dup
iconst_1
getstatic org.springframework.http.MediaType.ALL:Lorg/springframework/http/MediaType;
aastore
invokespecial org.springframework.http.converter.AbstractHttpMessageConverter.<init>:(Ljava/nio/charset/Charset;[Lorg/springframework/http/MediaType;)V
1: aload 0
iconst_1
putfield org.springframework.http.converter.StringHttpMessageConverter.writeAcceptCharset:Z
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 3 1 defaultCharset Ljava/nio/charset/Charset;
MethodParameters:
Name Flags
defaultCharset
public void setWriteAcceptCharset(boolean);
descriptor: (Z)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.springframework.http.converter.StringHttpMessageConverter.writeAcceptCharset:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 2 1 writeAcceptCharset Z
MethodParameters:
Name Flags
writeAcceptCharset
public boolean supports(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: ldc Ljava/lang/String;
aload 1
if_acmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 2 1 clazz Ljava/lang/Class<*>;
Signature: (Ljava/lang/Class<*>;)Z
MethodParameters:
Name Flags
clazz
protected java.lang.String readInternal(java.lang.Class<? extends java.lang.String>, org.springframework.http.HttpInputMessage);
descriptor: (Ljava/lang/Class;Lorg/springframework/http/HttpInputMessage;)Ljava/lang/String;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokeinterface org.springframework.http.HttpInputMessage.getHeaders:()Lorg/springframework/http/HttpHeaders;
invokevirtual org.springframework.http.HttpHeaders.getContentType:()Lorg/springframework/http/MediaType;
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getContentTypeCharset:(Lorg/springframework/http/MediaType;)Ljava/nio/charset/Charset;
astore 3
start local 3 1: aload 2
invokeinterface org.springframework.http.HttpInputMessage.getBody:()Ljava/io/InputStream;
aload 3
invokestatic org.springframework.util.StreamUtils.copyToString:(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Ljava/lang/String;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 2 1 clazz Ljava/lang/Class<+Ljava/lang/String;>;
0 2 2 inputMessage Lorg/springframework/http/HttpInputMessage;
1 2 3 charset Ljava/nio/charset/Charset;
Exceptions:
throws java.io.IOException
Signature: (Ljava/lang/Class<+Ljava/lang/String;>;Lorg/springframework/http/HttpInputMessage;)Ljava/lang/String;
MethodParameters:
Name Flags
clazz
inputMessage
protected java.lang.Long getContentLength(java.lang.String, org.springframework.http.MediaType);
descriptor: (Ljava/lang/String;Lorg/springframework/http/MediaType;)Ljava/lang/Long;
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getContentTypeCharset:(Lorg/springframework/http/MediaType;)Ljava/nio/charset/Charset;
astore 3
start local 3 1: aload 1
aload 3
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
arraylength
i2l
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 2 1 str Ljava/lang/String;
0 2 2 contentType Lorg/springframework/http/MediaType;
1 2 3 charset Ljava/nio/charset/Charset;
RuntimeVisibleParameterAnnotations:
0:
1:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
str
contentType
protected void writeInternal(java.lang.String, org.springframework.http.HttpOutputMessage);
descriptor: (Ljava/lang/String;Lorg/springframework/http/HttpOutputMessage;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.springframework.http.converter.StringHttpMessageConverter.writeAcceptCharset:Z
ifeq 2
1: aload 2
invokeinterface org.springframework.http.HttpOutputMessage.getHeaders:()Lorg/springframework/http/HttpHeaders;
aload 0
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getAcceptedCharsets:()Ljava/util/List;
invokevirtual org.springframework.http.HttpHeaders.setAcceptCharset:(Ljava/util/List;)V
2: StackMap locals:
StackMap stack:
aload 0
aload 2
invokeinterface org.springframework.http.HttpOutputMessage.getHeaders:()Lorg/springframework/http/HttpHeaders;
invokevirtual org.springframework.http.HttpHeaders.getContentType:()Lorg/springframework/http/MediaType;
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getContentTypeCharset:(Lorg/springframework/http/MediaType;)Ljava/nio/charset/Charset;
astore 3
start local 3 3: aload 1
aload 3
aload 2
invokeinterface org.springframework.http.HttpOutputMessage.getBody:()Ljava/io/OutputStream;
invokestatic org.springframework.util.StreamUtils.copy:(Ljava/lang/String;Ljava/nio/charset/Charset;Ljava/io/OutputStream;)V
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 5 1 str Ljava/lang/String;
0 5 2 outputMessage Lorg/springframework/http/HttpOutputMessage;
3 5 3 charset Ljava/nio/charset/Charset;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
str
outputMessage
protected java.util.List<java.nio.charset.Charset> getAcceptedCharsets();
descriptor: ()Ljava/util/List;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.springframework.http.converter.StringHttpMessageConverter.availableCharsets:Ljava/util/List;
astore 1
start local 1 1: aload 1
ifnonnull 4
2: new java.util.ArrayList
dup
invokestatic java.nio.charset.Charset.availableCharsets:()Ljava/util/SortedMap;
invokeinterface java.util.SortedMap.values:()Ljava/util/Collection;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 1
3: aload 0
aload 1
putfield org.springframework.http.converter.StringHttpMessageConverter.availableCharsets:Ljava/util/List;
4: StackMap locals: java.util.List
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
1 5 1 charsets Ljava/util/List<Ljava/nio/charset/Charset;>;
Signature: ()Ljava/util/List<Ljava/nio/charset/Charset;>;
private java.nio.charset.Charset getContentTypeCharset(org.springframework.http.MediaType);
descriptor: (Lorg/springframework/http/MediaType;)Ljava/nio/charset/Charset;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnull 2
aload 1
invokevirtual org.springframework.http.MediaType.getCharset:()Ljava/nio/charset/Charset;
ifnull 2
1: aload 1
invokevirtual org.springframework.http.MediaType.getCharset:()Ljava/nio/charset/Charset;
areturn
2: StackMap locals:
StackMap stack:
aload 1
ifnull 4
aload 1
getstatic org.springframework.http.MediaType.APPLICATION_JSON:Lorg/springframework/http/MediaType;
invokevirtual org.springframework.http.MediaType.isCompatibleWith:(Lorg/springframework/http/MediaType;)Z
ifeq 4
3: getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
areturn
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getDefaultCharset:()Ljava/nio/charset/Charset;
astore 2
start local 2 5: aload 2
ifnull 6
iconst_1
goto 7
StackMap locals: java.nio.charset.Charset
StackMap stack:
6: iconst_0
StackMap locals:
StackMap stack: int
7: ldc "No default charset"
invokestatic org.springframework.util.Assert.state:(ZLjava/lang/String;)V
8: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/springframework/http/converter/StringHttpMessageConverter;
0 9 1 contentType Lorg/springframework/http/MediaType;
5 9 2 charset Ljava/nio/charset/Charset;
RuntimeVisibleParameterAnnotations:
0:
org.springframework.lang.Nullable()
MethodParameters:
Name Flags
contentType
protected java.lang.Object readInternal(java.lang.Class, org.springframework.http.HttpInputMessage);
descriptor: (Ljava/lang/Class;Lorg/springframework/http/HttpInputMessage;)Ljava/lang/Object;
flags: (0x1044) ACC_PROTECTED, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
checkcast java.lang.Class
aload 2
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.readInternal:(Ljava/lang/Class;Lorg/springframework/http/HttpInputMessage;)Ljava/lang/String;
areturn
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException, org.springframework.http.converter.HttpMessageNotReadableException
protected java.lang.Long getContentLength(java.lang.Object, org.springframework.http.MediaType);
descriptor: (Ljava/lang/Object;Lorg/springframework/http/MediaType;)Ljava/lang/Long;
flags: (0x1044) ACC_PROTECTED, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
checkcast java.lang.String
aload 2
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.getContentLength:(Ljava/lang/String;Lorg/springframework/http/MediaType;)Ljava/lang/Long;
areturn
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException
protected void writeInternal(java.lang.Object, org.springframework.http.HttpOutputMessage);
descriptor: (Ljava/lang/Object;Lorg/springframework/http/HttpOutputMessage;)V
flags: (0x1044) ACC_PROTECTED, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
0: aload 0
aload 1
checkcast java.lang.String
aload 2
invokevirtual org.springframework.http.converter.StringHttpMessageConverter.writeInternal:(Ljava/lang/String;Lorg/springframework/http/HttpOutputMessage;)V
return
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException, org.springframework.http.converter.HttpMessageNotWritableException
}
Signature: Lorg/springframework/http/converter/AbstractHttpMessageConverter<Ljava/lang/String;>;
SourceFile: "StringHttpMessageConverter.java"