()
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public void run() { |
| 58 | try (var in = new BufferedInputStream(new URL(_url).openStream()); |
| 59 | var out = new ByteArrayOutputStream();) |
| 60 | { |
| 61 | in.transferTo(out); |
| 62 | if (_thread == this) { |
| 63 | try (var data = org.jetbrains.skija.Data.makeFromBytes(out.toByteArray());) { |
| 64 | _dom = new SVGDOM(data); |
| 65 | } |
| 66 | } |
| 67 | } catch (Exception e) { |
| 68 | if (_thread == this) |
| 69 | _error = e; |
| 70 | } finally { |
| 71 | if (_thread == this) |
| 72 | _thread = null; |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | @Override |