public class BdmpSource extends Object
created in 2020/11/18
| 限定符和类型 | 类和说明 |
|---|---|
static class |
BdmpSource.SourceType
源类型: {文件地址, 网络地址, 二进制流, 剪贴板}
|
| 限定符和类型 | 字段和说明 |
|---|---|
private byte[] |
content
源内容
|
private com.github.cosycode.common.base.SupplierWithThrow<byte[],IOException> |
dataSupplier |
private String |
name
图片源名称, 如果源是文件的话, 那么此处为文件的名字
|
private BdmpSource.SourceType |
sourceType
图片源类型
|
| 构造器和说明 |
|---|
BdmpSource(BdmpSource.SourceType sourceType,
String name,
com.github.cosycode.common.base.SupplierWithThrow<byte[],IOException> dataSupplier) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkWithThrow() |
static BdmpSource |
geneByClipboard(String name,
byte[] content) |
static BdmpSource |
geneByFile(File file) |
byte[] |
getContent() |
private final BdmpSource.SourceType sourceType
private final String name
private byte[] content
private final com.github.cosycode.common.base.SupplierWithThrow<byte[],IOException> dataSupplier
public BdmpSource(BdmpSource.SourceType sourceType, String name, com.github.cosycode.common.base.SupplierWithThrow<byte[],IOException> dataSupplier)
public static BdmpSource geneByFile(File file)
public static BdmpSource geneByClipboard(String name, byte[] content)
public void checkWithThrow()
throws IOException
IOExceptionpublic byte[] getContent()
throws IOException
IOExceptionCopyright © 2021. All rights reserved.