Changeset 15858 in osm for applications/editors/josm/plugins/wmsplugin/src
- Timestamp:
- 2009-06-12T10:01:57+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/wmsplugin/src/wmsplugin
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java
r15185 r15858 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.image.BufferedImage;6 import java.awt.Graphics;7 5 import java.awt.Color; 8 6 import java.awt.Font; 7 import java.awt.Graphics; 8 import java.awt.image.BufferedImage; 9 9 10 import org.openstreetmap.josm.Main; 10 11 import org.openstreetmap.josm.data.Bounds; 12 import org.openstreetmap.josm.data.coor.LatLon; 11 13 import org.openstreetmap.josm.data.projection.Projection; 12 14 import org.openstreetmap.josm.gui.MapView; 13 import org.openstreetmap.josm.Main;14 import org.openstreetmap.josm.data.coor.LatLon;15 15 import org.openstreetmap.josm.io.CacheFiles; 16 16 … … 24 24 protected CacheFiles cache; 25 25 26 Grabber(Bounds b, Projection proj, double pixelPerDegree, GeorefImage image, 27 MapView mv, WMSLayer layer, CacheFiles cache) 26 Grabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) 28 27 { 29 28 if (b.min != null && b.max != null && WMSPlugin.doOverlap) … … 46 45 this.b = b; 47 46 48 this.proj = proj;49 this.pixelPerDegree = pixelPerDegree;47 this.proj = Main.main.proj; 48 this.pixelPerDegree = layer.pixelPerDegree; 50 49 this.image = image; 51 50 this.mv = mv; -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java
r15827 r15858 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.GridBagLayout; 6 import java.awt.Toolkit; 7 import java.awt.datatransfer.DataFlavor; 8 import java.awt.datatransfer.Transferable; 5 9 import java.awt.event.ActionEvent; 6 10 import java.awt.event.KeyEvent; 7 import java.awt.datatransfer.DataFlavor;8 import java.awt.datatransfer.Transferable;9 import java.awt.GridBagLayout;10 import java.awt.Toolkit;11 12 11 import java.util.ArrayList; 13 12 import java.util.regex.Matcher; … … 21 20 import javax.swing.JTextField; 22 21 22 import org.openstreetmap.josm.Main; 23 23 import org.openstreetmap.josm.actions.JosmAction; 24 24 import org.openstreetmap.josm.gui.ExtendedDialog; 25 import org.openstreetmap.josm.gui.MapView;26 import org.openstreetmap.josm.Main;27 25 import org.openstreetmap.josm.tools.GBC; 28 26 import org.openstreetmap.josm.tools.Shortcut; … … 34 32 */ 35 33 public class rectifierService { 36 private String name;37 private String url;38 private String wmsUrl;39 private Pattern urlRegEx;40 private Pattern idValidator;34 private final String name; 35 private final String url; 36 private final String wmsUrl; 37 private final Pattern urlRegEx; 38 private final Pattern idValidator; 41 39 public JRadioButton btn; 42 40 /** 43 44 45 46 47 48 41 * @param name: Name of the rectifing service 42 * @param url: URL to the service where users can register, upload, etc. 43 * @param wmsUrl: URL to the WMS server where JOSM will grab the images. Insert __s__ where the ID should be placed 44 * @param urlRegEx: a regular expression that determines if a given URL is one of the service and returns the WMS id if so 45 * @param idValidator: regular expression that checks if a given ID is syntactically valid 46 */ 49 47 public rectifierService(String name, String url, String wmsUrl, String urlRegEx, String idValidator) { 50 48 this.name = name; … … 62 60 /** 63 61 * List of available rectifier services. May be extended from the outside 64 */62 */ 65 63 public ArrayList<rectifierService> services = new ArrayList<rectifierService>(); 66 64 67 65 public Map_Rectifier_WMSmenuAction() { 68 66 super(tr("Rectified Image..."), 69 "OLmarker",70 tr("Download Rectified Images From Various Services"),71 Shortcut.registerShortcut("wms:rectimg",72 tr("WMS: {0}", tr("Rectified Image...")),73 KeyEvent.VK_R,74 Shortcut.GROUP_NONE),75 true67 "OLmarker", 68 tr("Download Rectified Images From Various Services"), 69 Shortcut.registerShortcut("wms:rectimg", 70 tr("WMS: {0}", tr("Rectified Image...")), 71 KeyEvent.VK_R, 72 Shortcut.GROUP_NONE), 73 true 76 74 ); 77 75 … … 81 79 "http://labs.metacarta.com/rectifier/", 82 80 "http://labs.metacarta.com/rectifier/wms.cgi?id=__s__&srs=EPSG:4326" 83 81 + "&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png", 84 82 // This matches more than the "classic" WMS link, so users can pretty much 85 83 // copy any link as long as it includes the ID … … 94 92 "http://warper.geothings.net/", 95 93 "http://warper.geothings.net/maps/wms/__s__?request=GetMap&version=1.1.1" 96 94 + "&styles=&format=image/png&srs=epsg:4326&exceptions=application/vnd.ogc.se_inimage", 97 95 // This matches more than the "classic" WMS link, so users can pretty much 98 96 // copy any link as long as it includes the ID 99 "(?:mapwarper\\.net|warper\\.geothings\\.net /(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)",97 "(?:mapwarper\\.net|warper\\.geothings\\.net)/(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)", 100 98 "^[0-9]+$") 101 99 ); … … 127 125 // service will be pre-selected. 128 126 if(!clip.equals("") && tfWmsUrl.getText().equals("") 129 && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {127 && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) { 130 128 serviceBtn.setSelected(true); 131 129 tfWmsUrl.setText(clip); … … 148 146 149 147 ExtendedDialog diag = new ExtendedDialog(Main.parent, 150 151 152 153 148 tr("Add Rectified Image"), 149 panel, 150 new String[] {tr("Add Rectified Image"), tr("Cancel")}, 151 new String[] {"OLmarker.png", "cancel.png"}); 154 152 155 153 // This repeatedly shows the dialog in case there has been an error. … … 198 196 // and display an error message. The while(true) ensures that the dialog pops up again 199 197 JOptionPane.showMessageDialog(Main.parent, 200 tr("Couldn't match the entered link or id to the selected service. Please try again."),201 tr("No valid WMS URL or id"),202 JOptionPane.ERROR_MESSAGE);198 tr("Couldn't match the entered link or id to the selected service. Please try again."), 199 tr("No valid WMS URL or id"), 200 JOptionPane.ERROR_MESSAGE); 203 201 diag.setVisible(true); 204 202 } … … 206 204 207 205 /** 208 * Adds a WMS Layer with given title and UR :206 * Adds a WMS Layer with given title and URL 209 207 * @param title: Name of the layer as it will shop up in the layer manager 210 208 * @param url: URL to the WMS server 209 * @param cookies: Cookies to send with each image request (Format: josm=is; very=cool) 210 */ 211 private void addWMSLayer(String title, String url, String cookies) { 212 WMSLayer wmsLayer = new WMSLayer(title, url, cookies); 213 Main.main.addLayer(wmsLayer); 214 } 215 216 /** 217 * Adds a WMS Layer with given title and URL 218 * @param title: Name of the layer as it will shop up in the layer manager 219 * @param url: URL to the WMS server 211 220 */ 212 221 private void addWMSLayer(String title, String url) { 213 WMSLayer wmsLayer = new WMSLayer(title, url); 214 Main.main.addLayer(wmsLayer); 222 addWMSLayer(title, url, ""); 215 223 } 216 224 -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java
r13497 r15858 7 7 import org.openstreetmap.josm.Main; 8 8 import org.openstreetmap.josm.actions.JosmAction; 9 import org.openstreetmap.josm.gui.MapView;10 import org.openstreetmap.josm.gui.layer.Layer;11 import org.openstreetmap.josm.data.Bounds;12 9 13 10 public class WMSDownloadAction extends JosmAction { 14 11 15 private WMSInfo info;12 private final WMSInfo info; 16 13 17 14 public WMSDownloadAction(WMSInfo info) { … … 24 21 System.out.println(info.url); 25 22 26 WMSLayer wmsLayer = new WMSLayer(info.name, info.url );23 WMSLayer wmsLayer = new WMSLayer(info.name, info.url, info.cookies); 27 24 Main.main.addLayer(wmsLayer); 28 25 } … … 30 27 public static WMSLayer getLayer(WMSInfo info) { 31 28 // FIXME: move this to WMSPlugin/WMSInfo/preferences. 32 WMSLayer wmsLayer = new WMSLayer(info.name, info.url );29 WMSLayer wmsLayer = new WMSLayer(info.name, info.url, info.cookies); 33 30 Main.main.addLayer(wmsLayer); 34 31 return wmsLayer; -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
r15725 r15858 17 17 import java.text.NumberFormat; 18 18 import java.util.Locale; 19 import java.util.concurrent.TimeUnit;20 19 import java.util.regex.Matcher; 21 20 import java.util.regex.Pattern; … … 26 25 import org.openstreetmap.josm.Main; 27 26 import org.openstreetmap.josm.data.Bounds; 28 import org.openstreetmap.josm.data.projection.Projection;29 27 import org.openstreetmap.josm.gui.MapView; 30 28 import org.openstreetmap.josm.io.CacheFiles; … … 34 32 public class WMSGrabber extends Grabber { 35 33 protected String baseURL; 36 private static Boolean shownWarning = false; 37 private boolean urlWithPatterns; 34 private final boolean urlWithPatterns; 38 35 39 WMSGrabber(String baseURL, Bounds b, Projection proj, 40 double pixelPerDegree, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) { 41 super(b, proj, pixelPerDegree, image, mv, layer, cache); 42 this.baseURL = baseURL; 36 WMSGrabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) { 37 super(b, image, mv, layer, cache); 38 this.baseURL = layer.baseURL; 43 39 /* URL containing placeholders? */ 44 40 urlWithPatterns = baseURL != null && baseURL.contains("{1}"); … … 71 67 } 72 68 73 public static final NumberFormat 74 latLonFormat = new DecimalFormat("###0.0000000", 69 public static final NumberFormat latLonFormat = new DecimalFormat("###0.0000000", 75 70 new DecimalFormatSymbols(Locale.US)); 76 71 … … 78 73 int wi, int ht) throws MalformedURLException { 79 74 String str = baseURL; 80 String bbox = latLonFormat.format(w) + "," +81 latLonFormat.format(s) + "," +82 latLonFormat.format(e) + "," +83 latLonFormat.format(n);75 String bbox = latLonFormat.format(w) + "," 76 + latLonFormat.format(s) + "," 77 + latLonFormat.format(e) + "," 78 + latLonFormat.format(n); 84 79 85 80 if (urlWithPatterns) { … … 132 127 BufferedImage cached = cache.getImg(url.toString()); 133 128 if(cached != null) return cached; 134 129 135 130 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); 131 if(layer.cookies != null && !layer.cookies.equals("")) 132 conn.setRequestProperty("Cookie", layer.cookies); 136 133 conn.setConnectTimeout(Main.pref.getInteger("wmsplugin.timeout.connect", 30) * 1000); 137 134 conn.setReadTimeout(Main.pref.getInteger("wmsplugin.timeout.read", 30) * 1000); … … 146 143 BufferedImage img = ImageIO.read(is); 147 144 is.close(); 148 145 149 146 cache.saveImg(url.toString(), img); 150 147 return img; -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java
r13645 r15858 12 12 String name; 13 13 String url; 14 String cookies; 14 15 int prefid; 15 16 16 17 public WMSInfo(String name, String url, int prefid) { 17 this .name=name; this.url=url; this.prefid=prefid;18 this(name, url, null, prefid); 18 19 } 19 20 21 public WMSInfo(String name, String url, String cookies, int prefid) { 22 this.name=name; 23 this.url=url; 24 this.cookies=cookies; 25 this.prefid=prefid; 26 } 20 27 21 28 public void save() { … … 23 30 Main.pref.put("wmsplugin.url." + prefid + ".url", url); 24 31 } 25 public int compareTo(WMSInfo c) 32 33 public int compareTo(WMSInfo in) 26 34 { 27 WMSInfo in = (WMSInfo)c;28 35 Integer i = name.compareTo(in.name); 29 36 if(i == 0) -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r15707 r15858 59 59 protected JCheckBoxMenuItem alphaChannel = new JCheckBoxMenuItem(new ToggleAlphaAction()); 60 60 protected String baseURL; 61 protected String cookies; 61 62 protected final int serializeFormatVersion = 4; 62 63 … … 64 65 65 66 public WMSLayer() { 66 this(tr("Blank Layer"), null );67 this(tr("Blank Layer"), null, null); 67 68 initializeImages(); 68 69 mv = Main.map.mapView; 69 70 } 70 71 71 public WMSLayer(String name, String baseURL ) {72 public WMSLayer(String name, String baseURL, String cookies) { 72 73 super(name); 73 74 alphaChannel.setSelected(Main.pref.getBoolean("wmsplugin.alpha_channel")); … … 75 76 initializeImages(); 76 77 this.baseURL = baseURL; 78 this.cookies = cookies; 77 79 WMSGrabber.getProjection(baseURL, true); 78 80 mv = Main.map.mapView; … … 86 88 try { 87 89 executor.shutdown(); 88 // Might not be initalized, so catch NullPointer as well90 // Might not be initalized, so catch NullPointer as well 89 91 } catch(Exception x) {} 90 92 } … … 128 130 private Bounds XYtoBounds (int x, int y) { 129 131 return new Bounds( 130 new LatLon( x * ImageSize / pixelPerDegree, 131 y * ImageSize / pixelPerDegree), 132 new LatLon((x + 1) * ImageSize / pixelPerDegree, 133 (y + 1) * ImageSize / pixelPerDegree)); 132 new LatLon( x * ImageSize / pixelPerDegree, y * ImageSize / pixelPerDegree), 133 new LatLon((x + 1) * ImageSize / pixelPerDegree, (y + 1) * ImageSize / pixelPerDegree)); 134 134 } 135 135 136 136 private int modulo (int a, int b) { 137 if(a%b>=0)return a%b; 138 else return a%b+b; 137 return a % b >= 0 ? a%b : a%b+b; 139 138 } 140 139 … … 180 179 img.image = null; 181 180 img.flushedResizedCachedInstance(); 182 Grabber gr = WMSPlugin.getGrabber( baseURL, XYtoBounds(x,y), Main.main.proj, pixelPerDegree, img, mv, this);181 Grabber gr = WMSPlugin.getGrabber(XYtoBounds(x,y), img, mv, this); 183 182 executor.submit(gr); 184 }185 }183 } 184 } 186 185 } 187 186 … … 220 219 for(int x = 0; x<dax; ++x) 221 220 for(int y = 0; y<day; ++y) 222 223 224 221 if(images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null) 222 if(images[x][y].contains(eastNorth, dx, dy)) 223 return images[x][y]; 225 224 return null; 226 225 } … … 294 293 } 295 294 public void actionPerformed(ActionEvent ev) { 296 File f = DiskAccessAction.createAndOpenSaveFileChooser( 297 tr("Save WMS layer"), ".wms"); 295 File f = DiskAccessAction.createAndOpenSaveFileChooser(tr("Save WMS layer"), ".wms"); 298 296 try 299 297 { … … 323 321 public void actionPerformed(ActionEvent ev) { 324 322 JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, 325 false, tr("Load WMS layer"));323 false, tr("Load WMS layer")); 326 324 if(fc == null) return; 327 325 File f = fc.getSelectedFile(); … … 334 332 if (sfv != serializeFormatVersion) { 335 333 JOptionPane.showMessageDialog(Main.parent, 336 tr("Unsupported WMS file version; found {0}, expected {1}", sfv, serializeFormatVersion),337 tr("File Format Error"),338 JOptionPane.ERROR_MESSAGE);334 tr("Unsupported WMS file version; found {0}, expected {1}", sfv, serializeFormatVersion), 335 tr("File Format Error"), 336 JOptionPane.ERROR_MESSAGE); 339 337 return; 340 338 } … … 355 353 ex.printStackTrace(System.out); 356 354 JOptionPane.showMessageDialog(Main.parent, 357 tr("Error loading file"),358 tr("Error"),359 JOptionPane.ERROR_MESSAGE);355 tr("Error loading file"), 356 tr("Error"), 357 JOptionPane.ERROR_MESSAGE); 360 358 return; 361 359 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
r15185 r15858 6 6 import java.awt.event.ActionEvent; 7 7 import java.awt.event.KeyEvent; 8 import java.io.BufferedReader; 9 import java.io.File; 10 import java.io.FileNotFoundException; 11 import java.io.FileOutputStream; 12 import java.io.IOException; 13 import java.io.InputStream; 14 import java.io.InputStreamReader; 15 import java.io.UnsupportedEncodingException; 8 16 import java.util.ArrayList; 9 17 import java.util.Collections; 10 18 import java.util.Map; 19 import java.util.TreeMap; 11 20 import java.util.TreeSet; 12 import java.util.TreeMap; 13 import java.io.*; 14 15 import javax.swing.AbstractAction; 16 import javax.swing.AbstractButton; 21 17 22 import javax.swing.JMenu; 18 23 import javax.swing.JMenuItem; 19 24 20 25 import org.openstreetmap.josm.Main; 21 import org.openstreetmap.josm.plugins.Plugin; 26 import org.openstreetmap.josm.actions.JosmAction; 27 import org.openstreetmap.josm.data.Bounds; 28 import org.openstreetmap.josm.gui.IconToggleButton; 22 29 import org.openstreetmap.josm.gui.MainMenu; 23 30 import org.openstreetmap.josm.gui.MapFrame; 24 import org.openstreetmap.josm.gui. IconToggleButton;31 import org.openstreetmap.josm.gui.MapView; 25 32 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 26 33 import org.openstreetmap.josm.io.CacheFiles; 27 34 import org.openstreetmap.josm.io.MirroredInputStream; 28 import org.openstreetmap.josm.actions.JosmAction; 29 import org.openstreetmap.josm.data.Bounds; 30 import org.openstreetmap.josm.data.projection.Projection; 31 import org.openstreetmap.josm.gui.MapView; 35 import org.openstreetmap.josm.plugins.Plugin; 32 36 33 37 public class WMSPlugin extends Plugin { … … 104 108 String name = null; 105 109 String url = null; 110 String cookies = ""; 106 111 int lastid = -1; 107 112 for (String key : keys) { … … 120 125 else if (elements[3].equals("url")) 121 126 url = prefs.get(key); 127 else if (elements[3].equals("cookies")) 128 cookies = prefs.get(key); 122 129 if (name != null && url != null) 123 wmsList.add(new WMSInfo(name, url, prefid));130 wmsList.add(new WMSInfo(name, url, cookies, prefid)); 124 131 } 125 132 String source = "http://svn.openstreetmap.org/applications/editors/josm/plugins/wmsplugin/sources.cfg"; … … 127 134 { 128 135 MirroredInputStream s = new MirroredInputStream(source, 129 Main.pref.getPreferencesDir() + "plugins/wmsplugin/", -1);136 Main.pref.getPreferencesDir() + "plugins/wmsplugin/", -1); 130 137 InputStreamReader r; 131 138 try … … 200 207 } 201 208 202 public static Grabber getGrabber(String _baseURL, Bounds _b, Projection _proj, 203 double _pixelPerDegree, GeorefImage _image, MapView _mv, WMSLayer _layer){ 204 if(_baseURL.startsWith("yahoo://")) 205 return new YAHOOGrabber(_baseURL, _b, _proj, _pixelPerDegree, _image, _mv, _layer, cache); 209 // baseURL, XYtoBounds(x,y), Main.main.proj, pixelPerDegree, img, mv, this 210 // Grabber gr = WMSPlugin.getGrabber(XYtoBounds(x,y), img, mv, this); 211 public static Grabber getGrabber(Bounds bounds, GeorefImage img, MapView mv, WMSLayer layer){ 212 if(layer.baseURL.startsWith("yahoo://")) 213 return new YAHOOGrabber(bounds, img, mv, layer, cache); 206 214 else 207 return new WMSGrabber(_baseURL, _b, _proj, _pixelPerDegree, _image, _mv, _layer, cache); 215 return new WMSGrabber(bounds, img, mv, layer, cache); 216 208 217 // OSBGrabber should be rewrite for thread support first 209 //if (wmsurl.matches("(?i).*layers=npeoocmap.*") || wmsurl.matches("(?i).*layers=npe.*") ) {218 //if (wmsurl.matches("(?i).*layers=npeoocmap.*") || wmsurl.matches("(?i).*layers=npe.*") ) 210 219 // return new OSGBGrabber(_b, _proj, _pixelPerDegree, _images, _mv, _layer); 211 //} else {212 // return new WMSGrabber(_b, _proj, _pixelPerDegree, _images, _mv, _layer);213 //}214 220 } 215 221 … … 220 226 if(item != null) item.setEnabled(isEnabled); 221 227 } 222 228 menuEnabled = isEnabled; 223 229 } 224 230 … … 227 233 setEnabledAll(true); 228 234 Main.map.addMapMode(new IconToggleButton 229 235 (new WMSAdjustAction(Main.map))); 230 236 } else if (oldFrame!=null && newFrame==null ) { 231 237 setEnabledAll(false); -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java
r15185 r15858 1 1 package wmsplugin; 2 2 3 import static org.openstreetmap.josm.tools.I18n.tr;4 5 3 import java.awt.image.BufferedImage; 6 import java. awt.Image;4 import java.io.IOException; 7 5 import java.net.URL; 8 import java.io.IOException;9 6 import java.text.MessageFormat; 10 7 import java.util.ArrayList; … … 13 10 import javax.imageio.ImageIO; 14 11 15 import org.openstreetmap.josm.Main;16 12 import org.openstreetmap.josm.data.Bounds; 17 import org.openstreetmap.josm. data.projection.Projection;13 import org.openstreetmap.josm.gui.MapView; 18 14 import org.openstreetmap.josm.io.CacheFiles; 19 import org.openstreetmap.josm.gui.MapView;20 15 21 16 … … 23 18 protected String browserCmd; 24 19 25 YAHOOGrabber(String baseURL, Bounds b, Projection proj, 26 double pixelPerDegree, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) { 27 super("file:///" + WMSPlugin.getPrefsPath() + "ymap.html?" 28 , b, proj, pixelPerDegree, image, mv, layer, cache); 29 this.browserCmd = baseURL.replaceFirst("yahoo://", ""); 20 YAHOOGrabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) { 21 super(b, image, mv, layer, cache); 22 layer.baseURL = "file:///" + WMSPlugin.getPrefsPath() + "ymap.html?"; 23 this.browserCmd = layer.baseURL.replaceFirst("yahoo://", ""); 30 24 } 31 25 26 @Override 32 27 protected BufferedImage grab(URL url) throws IOException { 33 28 String urlstring = url.toExternalForm(); … … 53 48 throw new IOException( "Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage() ); 54 49 } 55 50 56 51 BufferedImage img = ImageIO.read(browser.getInputStream()); 57 52 cache.saveImg(urlstring, img);
Note:
See TracChangeset
for help on using the changeset viewer.