|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gdk.PixbufLoader
org.gnome.gdk.PixbufLoader
.
public class PixbufLoader
The PixbufLoader provides a way for applications to drive the
process of loading an image, by letting them send the image data directly to
the loader instead of having the loader read the data from a file.
Applications can use this functionality instead of
Pixbuf.Pixbuf(String)
or PixbufAnimation.PixbufAnimation(String)
when they need to parse image data
in small chunks. For example, it should be used when reading an image from a
(potentially) slow network connection, when loading an extremely large file
or even reading an image from a database.
To use PixbufLoader to load an image, just create a new one, and
call write(byte[])
, write(byte[],int)
, or
write(InputStream)
to send the data to it. When done, close()
should be called to end the stream and finalize everything. The created
Pixbuf
can be retireved using the getPixbuf()
method.
Pixbuf
,
PixbufAnimation
Constructor Summary | |
---|---|
PixbufLoader()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
PixbufLoader(java.lang.String imageType)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Method Summary | |
---|---|
boolean |
close()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
getPixbuf()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
PixbufAnimation |
getPixbufAnimation()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
write(byte[] buffer)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
write(byte[] buffer,
int len)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
write(java.io.InputStream stream)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Methods inherited from class org.gnu.glib.GObject |
---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PixbufLoader()
public PixbufLoader(java.lang.String imageType)
imageType
- Name of the image format to be loaded with the image.Method Detail |
---|
public boolean write(byte[] buffer)
public boolean write(byte[] buffer, int len)
public boolean write(java.io.InputStream stream)
write(byte[],int)
method. If all of the
data for the image is in the given stream, the close()
method should be called after this method finishes. You can call
getPixbuf()
to get the resulting Pixbuf object.
This method does not make any attempt to efficiently read the data from the given stream. Calling applications should wrap their InputStreams in efficient implementations (such as Buffered* implementations) if necessary before calling this method.
stream
- A stream containing the data to load.
public Pixbuf getPixbuf()
Pixbuf
object that is currently being created.
public PixbufAnimation getPixbufAnimation()
PixbufAnimation
object that is currently being
created.
public boolean close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |