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); } }
if (ex.getMessage().equals("org.eclipse.jetty.io.EofException")) { logger.info("closing SSE connection");
/** 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"); }
throw new RuntimeIOException(e);
throw new RuntimeIOException(e);
public void start() throws Exception { logger.info("Starting MockLogzioBulkListener"); server.start(); int attempts = 1; while (!server.isRunning()) { logger.info("Server has not started yet"); try { Thread.sleep(1000); } catch (InterruptedException e) { throw Throwables.propagate(e); } attempts++; if (attempts > 10) { throw new RuntimeIOException("Failed to start after multiple attempts"); } } logger.info("Started listening on {}:{} ({})", host, port, this); }
public void stop() { logger.info("Stopping MockLogzioBulkListener"); try { server.stop(); } catch (Exception e) { e.printStackTrace(); } int attempts = 1; while (server.isRunning()) { logger.info("Server has not stopped yet"); try { Thread.sleep(1000); } catch (InterruptedException e) { throw Throwables.propagate(e); } attempts++; if (attempts > 10) { throw new RuntimeIOException("Failed to stop after multiple attempts"); } } logger.info("Stopped listening on {}:{} ({})", host, port, this); }
if(x!=null) throw new RuntimeIOException(x.getMessage(), x); if(x!=null) throw new RuntimeIOException(x.getMessage(), x);
public void finish() { try { endMetric(); Iterator<String> remainingMetricIterator = remainingMetrics.iterator(); while (remainingMetricIterator.hasNext()) { String remainingMetric = remainingMetricIterator.next(); remainingMetricIterator.remove(); startMetric(remainingMetric); endMetric(); } } catch (IOException e) { log.error("Failed to read data from CH", e); throw new RuntimeIOException(e); } }