summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-17 21:21:26 +0100
committerSven Gothel <[email protected]>2012-03-17 21:21:26 +0100
commit4c5d6c1b5570fe1ba2cfbbed46259f0a21534ff5 (patch)
tree1b8f5674d17033591922064df1979cd00e945661 /src/jogl/classes/jogamp/graph
parentb048c2458b53eb012d15e21dde9e8ec0b1406d0b (diff)
Adapt to GlueGen IO resource changes URL -> URLConnection for effeciency; API doc enhancements; Minor edits
- API doc added/enhanced: - ShaderCode - ShaderUtil - NewtBaseActivity: Clarify method / var names
Diffstat (limited to 'src/jogl/classes/jogamp/graph')
-rw-r--r--src/jogl/classes/jogamp/graph/font/FontConstructor.java4
-rw-r--r--src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java8
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/FontConstructor.java b/src/jogl/classes/jogamp/graph/font/FontConstructor.java
index 721b2072f..b452ae548 100644
--- a/src/jogl/classes/jogamp/graph/font/FontConstructor.java
+++ b/src/jogl/classes/jogamp/graph/font/FontConstructor.java
@@ -29,11 +29,11 @@ package jogamp.graph.font;
import java.io.File;
import java.io.IOException;
-import java.net.URL;
+import java.net.URLConnection;
import com.jogamp.graph.font.Font;
public interface FontConstructor {
Font create(File file) throws IOException ;
- Font create(URL url) throws IOException ;
+ Font create(URLConnection url) throws IOException ;
}
diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
index e2c79a5a8..0772cc47f 100644
--- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
+++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
@@ -36,7 +36,7 @@ import com.jogamp.common.util.IOUtil;
import com.jogamp.graph.font.Font;
import com.jogamp.graph.font.FontSet;
import com.jogamp.graph.font.FontFactory;
-import java.net.URL;
+import java.net.URLConnection;
public class UbuntuFontLoader implements FontSet {
@@ -121,11 +121,11 @@ public class UbuntuFontLoader implements FontSet {
Font abspath(String fname, int family, int style) throws IOException {
final String err = "Problem loading font "+fname+", stream "+relPath+fname;
try {
- URL url = IOUtil.getResource(UbuntuFontLoader.class, relPath+fname);
- if(null == url) {
+ URLConnection conn = IOUtil.getResource(UbuntuFontLoader.class, relPath+fname);
+ if(null == conn) {
throw new GLException(err);
}
- final Font f= FontFactory.get ( url ) ;
+ final Font f= FontFactory.get ( conn ) ;
if(null != f) {
fontMap.put( ( family << 8 ) | style, f );
return f;
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
index d5fd34cf7..e8b62bdd2 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
@@ -29,7 +29,7 @@ package jogamp.graph.font.typecast;
import java.io.File;
import java.io.IOException;
-import java.net.URL;
+import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -64,7 +64,7 @@ public class TypecastFontConstructor implements FontConstructor {
throw new InternalError("Unexpected Object: "+o);
}
- public Font create(final URL furl) throws IOException {
+ public Font create(final URLConnection fconn) throws IOException {
return AccessController.doPrivileged(new PrivilegedAction<Font>() {
public Font run() {
File tf = null;
@@ -72,10 +72,10 @@ public class TypecastFontConstructor implements FontConstructor {
Font f = null;
try {
tf = IOUtil.createTempFile( "joglfont", ".ttf", null);
- len = IOUtil.copyURL2File(furl, tf);
+ len = IOUtil.copyURLConn2File(fconn, tf);
if(len==0) {
tf.delete();
- throw new GLException("Font of stream "+furl+" was zero bytes");
+ throw new GLException("Font of stream "+fconn.getURL()+" was zero bytes");
}
f = create(tf);
tf.delete();