org.jmythapi.protocol.response.impl
Class Pixmap

java.lang.Object
  extended by org.jmythapi.impl.AData<E>
      extended by org.jmythapi.protocol.response.impl.AMythResponse<IPixmap.Props>
          extended by org.jmythapi.protocol.response.impl.Pixmap
All Implemented Interfaces:
Cloneable, IPropertyAware<IPixmap.Props>, IVersionable, ISendable, IMythResponse<IPixmap.Props>, IPixmap

public class Pixmap
extends AMythResponse<IPixmap.Props>
implements IPixmap


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jmythapi.protocol.response.IPixmap
IPixmap.Props
 
Field Summary
 
Fields inherited from class org.jmythapi.impl.AData
logger, propsClass, protoVersion, respArgs
 
Constructor Summary
Pixmap(IMythPacket packet)
           
Pixmap(ProtocolVersion protoVersion, List<String> responseArgs)
           
Pixmap(ProtocolVersion protoVersion, String... responseArgs)
           
 
Method Summary
 byte[] getData()
          Gets the pixmap as byte array.
 String getDataBase64()
          Gets the pixmap as base64 encoded string.
 String getDataCheckSum()
          Gets the pixmap checksum.
 Long getDataSize()
          Gets the data size in bytes.
 InputStream getDataStream()
          Gets the pixmap as stream.
 BufferedImage getImage()
          Gets the pixmap as image.
 Date getLastModified()
           
static Pixmap valueOf(IFileTransfer fileTransfer, Date lastModifiedDate)
          This method creates a new pixmap object.
static Pixmap valueOf(IMythPacket packet)
           
static Pixmap valueOf(ProtocolVersion protoVersion, Date lastModifiedDate)
           
 
Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse
checkSize, decodeProperty, encodeProperty, getExpectedSize, getPacket, getProperties, getProperty, getPropertyIndex
 
Methods inherited from class org.jmythapi.impl.AData
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jmythapi.IVersionable
getVersionNr
 
Methods inherited from interface org.jmythapi.IPropertyAware
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject
 

Constructor Detail

Pixmap

public Pixmap(IMythPacket packet)

Pixmap

public Pixmap(ProtocolVersion protoVersion,
              String... responseArgs)

Pixmap

public Pixmap(ProtocolVersion protoVersion,
              List<String> responseArgs)
Method Detail

getLastModified

public Date getLastModified()
Specified by:
getLastModified in interface IPixmap

getDataSize

public Long getDataSize()
Description copied from interface: IPixmap
Gets the data size in bytes.

Specified by:
getDataSize in interface IPixmap
Returns:
the amount of returned bytes

getDataCheckSum

public String getDataCheckSum()
Description copied from interface: IPixmap
Gets the pixmap checksum.

Specified by:
getDataCheckSum in interface IPixmap
Returns:
a checksum.

getDataBase64

public String getDataBase64()
Description copied from interface: IPixmap
Gets the pixmap as base64 encoded string.

Specified by:
getDataBase64 in interface IPixmap
Returns:
the encoded pixmap

getData

public byte[] getData()
Description copied from interface: IPixmap
Gets the pixmap as byte array.

Specified by:
getData in interface IPixmap
Returns:
the pixmap as byte array.

getDataStream

public InputStream getDataStream()
Description copied from interface: IPixmap
Gets the pixmap as stream.

Specified by:
getDataStream in interface IPixmap
Returns:
a pixmap stream.

getImage

public BufferedImage getImage()
                       throws IOException
Description copied from interface: IPixmap
Gets the pixmap as image.

Specified by:
getImage in interface IPixmap
Returns:
the pixmap as image.
Throws:
IOException - on io errors

valueOf

public static Pixmap valueOf(IMythPacket packet)

valueOf

public static Pixmap valueOf(ProtocolVersion protoVersion,
                             Date lastModifiedDate)

valueOf

public static Pixmap valueOf(IFileTransfer fileTransfer,
                             Date lastModifiedDate)
                      throws IOException
This method creates a new pixmap object.

Parameters:
fileTransfer - the file-transfer object that is used to download the data
lastModifiedDate - the last modified date of the pixmap, if any.
Returns:
the pixmap object
Throws:
IOException - on communication errors.


Copyright © 2008-2013. All Rights Reserved.