public static URL stringToUrl(String value) { try { return new URL(value); } catch (MalformedURLException e) { throw new WrappedException(e); } }
public static URL stringToUrl(String value) { try { return new URL(value); } catch (MalformedURLException e) { throw new WrappedException(e); } }
@Override public String encode(String text) { try { return URLEncoder.encode(text, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } } },
@Override public String encode(String text) { try { return URLEncoder.encode(text, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } } },
@Override public String encode(String text) { try { return URLEncoder.encode(text, "UTF-8").replace("+", "%20"); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } } };
public static String decodeUsingDefaultCharset(String url) { try { return URLDecoder.decode(url, Charset.defaultCharset().name()); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } } }
@Override public String encode(String text) { try { return URLEncoder.encode(text, "UTF-8").replace("+", "%20"); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } } };
@SuppressWarnings("unchecked") public AstNodeImpl<T> cloneWrapException() { try { return (AstNodeImpl<T>) this.clone(); } catch (CloneNotSupportedException e) { throw new WrappedException(e); } }
public ExtLinkImpl(DocumentImpl owner) { super(owner); try { setTarget(new URL("http", null, ".")); } catch (MalformedURLException e) { throw new WrappedException(e); } }
public ExtLinkImpl(DocumentImpl owner) { super(owner); try { setTarget(new URL("http", null, ".")); } catch (MalformedURLException e) { throw new WrappedException(e); } }
public RtData cloneWrapException() { try { return (RtData) this.clone(); } catch (CloneNotSupportedException e) { throw new WrappedException(e); } }
public AstNodeImpl<T> deepCloneWrapException() { try { return this.deepClone(); } catch (CloneNotSupportedException e) { throw new WrappedException(e); } }
public static String printWom(Wom3Node node) { try { StringWriter sw = new StringWriter(); printWom(node, sw); return sw.toString(); } catch (Exception e) { throw new WrappedException(e); } }
public static String printWom(Wom3Node node) { try { StringWriter sw = new StringWriter(); printWom(node, sw); return sw.toString(); } catch (Exception e) { throw new WrappedException(e); } }
private double timeIt(RunMe runMe) { long startTime = System.nanoTime(); try { runMe.run(); } catch (Exception e) { throw new WrappedException(e); } long endTime = System.nanoTime(); return ((double) (endTime - startTime)) / 1000000000.; }
public static void womToDom(Wom3Node node, Node parent) { try { Transformer transformer = getSaxonTransformerFactory().newTransformer(); DOMResult result = new DOMResult(parent); transformer.transform(new DOMSource(node), result); } catch (Exception e) { throw new WrappedException(e); } } }
public static void womToDom(Wom3Node node, Node parent) { try { Transformer transformer = getSaxonTransformerFactory().newTransformer(); DOMResult result = new DOMResult(parent); transformer.transform(new DOMSource(node), result); } catch (Exception e) { throw new WrappedException(e); } } }
protected static TestResourcesFixture getTestResourcesFixture() { try { File path = TestResourcesFixture.resourceNameToFile( SerializationTestBase.class, "/"); return new TestResourcesFixture(path); } catch (FileNotFoundException e) { throw new WrappedException(e); } }
public boolean handleEvent(ValidationEvent ve) { try { return DumpReader.this.handleEvent(ve, ve.getLocator()); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new WrappedException(e); } } });
@Override public String toString() { String file = getFile(); if (file == null) return getLine() + ":" + getColumn(); try { return URLEncoder.encode(file, "UTF-8") + ":" + getLine() + ":" + getColumn(); } catch (UnsupportedEncodingException e) { throw new WrappedException(e); } }