1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-15 20:12:04 +01:00

Fixing dependencies.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8276 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2007-05-10 22:55:21 +00:00 committed by matt
parent 466b7e2d08
commit a3e9b99638
5 changed files with 45 additions and 30 deletions

View file

@ -47,9 +47,7 @@
<root url="jar://$MODULE_DIR$/../build/xmlunit.jar!/" /> <root url="jar://$MODULE_DIR$/../build/xmlunit.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES />
<root url="file://$MODULE_DIR$/../../../xmlunit-1.1beta1/src/java" />
</SOURCES>
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module-library" exported=""> <orderEntry type="module-library" exported="">

View file

@ -22,15 +22,6 @@
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../merge/jstun-0.6.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library"> <orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
@ -41,7 +32,42 @@
</library> </library>
</orderEntry> </orderEntry>
<orderEntry type="module" module-name="Smack" /> <orderEntry type="module" module-name="Smack" />
<orderEntry type="module" module-name="JingleMedia" /> <orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../merge/jstun.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../lib/Speex.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../lib/jspeex-0.9.7-jfcom.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/../lib/jmf.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntryProperties /> <orderEntryProperties />
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">

View file

@ -1,27 +1,16 @@
package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api; package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
import com.sixlegs.png.PngImage; import javax.imageio.ImageIO;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
/** /**
* Implements a default PNG Decoder * Implements a default PNG decoder.
*/ */
public class DefaultDecoder implements ImageDecoder{ public class DefaultDecoder implements ImageDecoder {
PngImage decoder = new PngImage(); public BufferedImage decode(ByteArrayInputStream stream) throws IOException {
return ImageIO.read(stream);
public BufferedImage decode(ByteArrayInputStream stream) {
BufferedImage image = null;
try {
image = decoder.read(stream,true);
}
catch (IOException e) {
e.printStackTrace();
// Do nothing
}
return image;
} }
} }

View file

@ -2,6 +2,7 @@ package org.jivesoftware.smackx.jingle.mediaimpl.sshare.api;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException;
/** /**
* Image Decoder Interface use this interface if you want to change the default decoder * Image Decoder Interface use this interface if you want to change the default decoder
@ -9,5 +10,6 @@ import java.io.ByteArrayInputStream;
* @author Thiago Rocha Camargo * @author Thiago Rocha Camargo
*/ */
public interface ImageDecoder { public interface ImageDecoder {
public BufferedImage decode(ByteArrayInputStream stream);
public BufferedImage decode(ByteArrayInputStream stream) throws IOException;
} }