public class Media extends Object
| 构造器和说明 |
|---|
Media(byte[] body) |
Media(byte[] body,
String contentType) |
Media(InputStream body) |
Media(InputStream body,
String contentType) |
Media(InputStream body,
String contentType,
long contentSize) |
Media(String body) |
Media(String body,
String contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
body()
主体
|
byte[] |
bodyAsBytes()
主体转为字节数组
|
byte[] |
bodyAsBytes(boolean autoClose) |
String |
bodyAsString()
主体转为字符串
|
String |
bodyAsString(boolean autoClose) |
long |
contentSize() |
String |
contentType()
内容类型
|
public Media(InputStream body, String contentType)
public Media(InputStream body, String contentType, long contentSize)
public Media(InputStream body)
public Media(byte[] body,
String contentType)
public Media(byte[] body)
public Media(String body)
public String contentType()
public long contentSize()
throws IOException
IOExceptionpublic InputStream body()
public byte[] bodyAsBytes()
public byte[] bodyAsBytes(boolean autoClose)
public String bodyAsString()
public String bodyAsString(boolean autoClose)
Copyright © 2023. All rights reserved.