public class HttpxBinaryResponseContent extends Object implements Closeable
| 构造器和说明 |
|---|
HttpxBinaryResponseContent(retrofit2.Response<okhttp3.ResponseBody> response) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
byte[] |
getContent() |
String |
getEncoding() |
String |
getText() |
Iterator<byte[]> |
iterBytes(int chunkSize) |
Iterator<String> |
iterText(int chunkSize) |
void |
streamToFile(String file,
int chunkSize) |
void |
writeToFile(String file) |
public HttpxBinaryResponseContent(retrofit2.Response<okhttp3.ResponseBody> response)
public byte[] getContent()
throws IOException
IOExceptionpublic String getText() throws IOException
IOExceptionpublic String getEncoding()
public Iterator<byte[]> iterBytes(int chunkSize) throws IOException
IOExceptionpublic Iterator<String> iterText(int chunkSize) throws IOException
IOExceptionpublic void writeToFile(String file) throws IOException
IOExceptionpublic void streamToFile(String file, int chunkSize) throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2025. All rights reserved.