public class Icon
extends java.lang.Object
AccountManager.setAvatar(Icon).| Modifier and Type | Method | Description |
|---|---|---|
static Icon |
from(byte[] data) |
Creates an
Icon with the specified image data. |
static Icon |
from(java.io.File file) |
Creates an
Icon with the specified File. |
static Icon |
from(java.io.InputStream stream) |
Creates an
Icon with the specified InputStream. |
java.lang.String |
getEncoding() |
The base64 encoded data for this Icon
|
public java.lang.String getEncoding()
public static Icon from(java.io.File file) throws java.io.IOException
Icon with the specified File.
from(byte[]).file - An existing, not-null file.java.lang.IllegalArgumentException - if the provided file is either null or does not existjava.io.IOException - if there is a problem while reading the file.IOUtil.readFully(File)public static Icon from(java.io.InputStream stream) throws java.io.IOException
Icon with the specified InputStream.
from(byte[]).stream - A not-null InputStream.java.lang.IllegalArgumentException - if the provided stream is nulljava.io.IOException - If the first byte cannot be read for any reason other than the end of the file,
if the input stream has been closed, or if some other I/O error occurs.IOUtil.readFully(InputStream)