protected LocationEntry(String name, boolean inclusive) { super(name, inclusive); if (!getName().startsWith("file:")) throw new IllegalArgumentException(name); try { _file = Resource.newResource(getName()).getFile(); } catch(IOException e) { throw new RuntimeIOException(e); } }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new IOException("Stream closed"); }
private String readVersion() { try { URL url = Resources.getResource(MirusSourceConnector.class, "mirus-version.txt"); return Resources.toString(url, Charsets.UTF_8); } catch (IOException e) { throw new RuntimeIOException(e); } }
public GZIPContentTransformer(ContentTransformer transformer) { try { this.transformer = transformer; this.out = new ByteArrayOutputStream(); this.gzipOut = new GZIPOutputStream(out); } catch (IOException x) { throw new RuntimeIOException(x); } }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new EofException("Stream closed"); }
/** Check to make sure that the stream has not been closed */ private void isOpen() throws IOException { if (_ioException!=null) throw new RuntimeIOException(_ioException); if (_isClosed) throw new EofException("Stream closed"); }
try { Timing timing = new Timing(); logger.error(msg + ' ' + path + " ... "); obj = IOUtils.readObjectFromURLOrClasspathOrFileSystem(path); timing.done(); } catch (IOException | ClassNotFoundException e) { throw new RuntimeIOException(e); } return obj;
@Override public String render(ModelAndView modelAndView) { String viewName = modelAndView.getViewName(); Mustache mustache = mustacheFactory.compile(viewName); StringWriter stringWriter = new StringWriter(); try { mustache.execute(stringWriter, modelAndView.getModel()).close(); } catch (IOException e) { throw new RuntimeIOException(e); } return stringWriter.toString(); } }
@Override public void customize(Connector connector, HttpConfiguration channelConfig, Request request) { try { matchAndApply(request.getPathInfo(), request, request.getResponse()); } catch (IOException e) { throw new RuntimeIOException(e); } } }
@Override public void open() throws IOException { _sslContextFactory.checkKeyStore(); try { _sslContextFactory.start(); } catch(Exception e) { throw new RuntimeIOException(e); } super.open(); }
@Override public void open() throws IOException { _sslContextFactory.checkKeyStore(); try { _sslContextFactory.start(); } catch(Exception e) { throw new RuntimeIOException(e); } super.open(); }
@Override public void open() throws IOException { _sslContextFactory.checkKeyStore(); try { _sslContextFactory.start(); } catch(Exception e) { throw new RuntimeIOException(e); } super.open(); }
@Override public String render(ModelAndView modelAndView) { String viewName = modelAndView.getViewName(); try { Template template = handlebars.compile(viewName); return template.apply(modelAndView.getModel()); } catch (IOException e) { throw new RuntimeIOException(e); } } }
@Override public String render(ModelAndView modelAndView) { String viewName = modelAndView.getViewName(); try { Template template = handlebars.compile(viewName); return template.apply(modelAndView.getModel()); } catch (IOException e) { throw new RuntimeIOException(e); } } }