Refine search
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public void networkError(IOException e) { System.err.println("NETWORK ERROR " + e.getMessage()); }
@Override public void onFailure(Call call, IOException e) { e.printStackTrace(); }
@Override public Maybe<Object> apply(Throwable v) throws Exception { throw new IOException(); } })
protected static TProtocol newProtocol(URL url, ChannelBuffer buffer) throws IOException { String protocol = url.getParameter(ThriftConstants.THRIFT_PROTOCOL_KEY, ThriftConstants.DEFAULT_PROTOCOL); if (ThriftConstants.BINARY_THRIFT_PROTOCOL.equals(protocol)) { return new TBinaryProtocol(new TIOStreamTransport(new ChannelBufferOutputStream(buffer))); } throw new IOException("Unsupported protocol type " + protocol); }
private static void sendRequest(OkHttpClient client, String url) { System.out.printf("%-40s ", url); System.out.flush(); System.out.println(Platform.get()); Request request = new Request.Builder().url(url).build(); try (Response response = client.newCall(request).execute()) { Handshake handshake = response.handshake(); System.out.println(handshake.tlsVersion() + " " + handshake.cipherSuite() + " " + response.protocol() + " " + response.code + " " + response.body.bytes().length + "b"); } catch (IOException ioe) { System.out.println(ioe.toString()); } } }
@Override public Integer apply(Integer v) throws Exception { throw new IOException(); } })
protected static TProtocol newProtocol(URL url, ChannelBuffer buffer) throws IOException { String protocol = url.getParameter(ThriftConstants.THRIFT_PROTOCOL_KEY, ThriftConstants.DEFAULT_PROTOCOL); if (ThriftConstants.BINARY_THRIFT_PROTOCOL.equals(protocol)) { return new TBinaryProtocol(new TIOStreamTransport(new ChannelBufferOutputStream(buffer))); } throw new IOException("Unsupported protocol type " + protocol); }
protected IOException expect(String expect, int ch) throws IOException { if (ch < 0) return error("expected " + expect + " at end of file"); else { _offset--; try { Object obj = readObject(); if (obj != null) { return error("expected " + expect + " at 0x" + Integer.toHexString(ch & 0xff) + " " + obj.getClass().getName() + " (" + obj + ")"); } else return error("expected " + expect + " at 0x" + Integer.toHexString(ch & 0xff) + " null"); } catch (IOException e) { log.log(Level.FINE, e.toString(), e); return error("expected " + expect + " at 0x" + Integer.toHexString(ch & 0xff)); } } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public boolean test(Integer v) throws Exception { throw new IOException(); } }).test().assertFailure(IOException.class);
private void handleProcessError(Resource resource, IOException ex) { if (this.resolutionMethod != ResolutionMethod.FIRST_FOUND && this.resolutionMethod != ResolutionMethod.OVERRIDE_AND_IGNORE) { throw new IllegalStateException(ex); } if (logger.isWarnEnabled()) { logger.warn("Could not load map from " + resource + ": " + ex.getMessage()); } }
@Override public void printStackTrace(PrintStream s) { super.printStackTrace(s); for (IOException exception : exceptions) { exception.printStackTrace(s); } }
/** * Begins the HTTP service. */ public void run() { System.err.println("ready to service..."); for (;;) try { ServiceThread th = new ServiceThread(this, socket.accept()); th.start(); } catch (IOException e) { logging(e.toString()); } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public Subscriber apply(Flowable f, Subscriber s) throws Exception { throw new IOException(); } });
private void send(String msg) throws RemotingException { DatagramPacket hi = new DatagramPacket(msg.getBytes(), msg.length(), mutilcastAddress, mutilcastSocket.getLocalPort()); try { mutilcastSocket.send(hi); } catch (IOException e) { throw new IllegalStateException(e.getMessage(), e); } }
@Override public void printStackTrace(PrintWriter s) { super.printStackTrace(s); for (IOException exception : exceptions) { exception.printStackTrace(s); } }
/** * find files. */ protected List<File> find(final File startDirectory) { final List<File> results = new ArrayList<>(); try { walk(startDirectory, results); } catch (final IOException ex) { fail(ex.toString()); } return results; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }