[libbluray-devel] Fix org.dvb.ui.FontFactory(URL)

hpi1 git at videolan.org
Tue Nov 11 08:07:59 CET 2014


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Nov  8 18:47:53 2014 +0200| [97bb5294ed4d78b7f0ce8c1e20c736f83daf121f] | committer: hpi1

Fix org.dvb.ui.FontFactory(URL)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=97bb5294ed4d78b7f0ce8c1e20c736f83daf121f
---

 src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java b/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
index 696d342..158446e 100644
--- a/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
+++ b/src/libbluray/bdj/java-j2se/org/dvb/ui/FontFactory.java
@@ -22,6 +22,7 @@ package org.dvb.ui;
 import java.awt.Font;
 import java.awt.FontFormatException;
 import java.io.FileInputStream;
+import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
 import java.util.HashMap;
@@ -80,10 +81,11 @@ public class FontFactory {
     }
 
     public FontFactory(URL u) throws IOException, FontFormatException {
-        FileInputStream inStream = null;
+        InputStream inStream = null;
 
         try {
-            inStream = new FileInputStream(u.getPath());
+
+            inStream = u.openStream();
             urlFont = Font.createFont(Font.TRUETYPE_FONT, inStream);
 
         } catch (IOException ex) {



More information about the libbluray-devel mailing list