Tabnine Logo
IOException
Code IndexAdd Tabnine to your IDE (free)

How to use
IOException
in
java.io

Best Java code snippets using java.io.IOException (Showing top 20 results out of 197,883)

Refine searchRefine arrow

  • TIOStreamTransport
  • TCompactProtocol
origin: apache/zeppelin

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);
 }
}
origin: square/retrofit

@Override public void networkError(IOException e) {
 System.err.println("NETWORK ERROR " + e.getMessage());
}
origin: square/okhttp

@Override public void onFailure(Call call, IOException e) {
 e.printStackTrace();
}
origin: ReactiveX/RxJava

  @Override
  public Maybe<Object> apply(Throwable v) throws Exception {
    throw new IOException();
  }
})
origin: apache/incubator-dubbo

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);
}
origin: square/okhttp

 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());
  }
 }
}
origin: ReactiveX/RxJava

  @Override
  public Integer apply(Integer v) throws Exception {
    throw new IOException();
  }
})
origin: apache/incubator-dubbo

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);
}
origin: apache/incubator-dubbo

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));
    }
  }
}
origin: apache/zeppelin

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);
 }
}
origin: ReactiveX/RxJava

  @Override
  public boolean test(Integer v) throws Exception {
    throw new IOException();
  }
}).test().assertFailure(IOException.class);
origin: spring-projects/spring-framework

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());
  }
}
origin: jenkinsci/jenkins

@Override
public void printStackTrace(PrintStream s) {
  super.printStackTrace(s);
  for (IOException exception : exceptions) {
    exception.printStackTrace(s);
  }
}
origin: redisson/redisson

/**
 * 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());
    }
}
origin: apache/zeppelin

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);
 }
}
origin: ReactiveX/RxJava

  @Override
  public Subscriber apply(Flowable f, Subscriber s) throws Exception {
    throw new IOException();
  }
});
origin: apache/incubator-dubbo

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);
  }
}
origin: jenkinsci/jenkins

@Override
public void printStackTrace(PrintWriter s) {
  super.printStackTrace(s);
  for (IOException exception : exceptions) {
    exception.printStackTrace(s);
  }
}
origin: commons-io/commons-io

/**
 * 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;
}
origin: apache/zeppelin

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);
 }
}
java.ioIOException

Javadoc

Signals a general, I/O-related error. Error details may be specified when calling the constructor, as usual. Note there are also several subclasses of this class for more specific error situations, such as FileNotFoundException or EOFException.

Most used methods

  • <init>
    Constructs a new instance of this class with its detail cause filled in.
  • getMessage
  • printStackTrace
  • toString
  • initCause
  • getLocalizedMessage
  • getCause
  • getStackTrace
  • addSuppressed
  • setStackTrace
  • fillInStackTrace
  • getSuppressed
  • fillInStackTrace,
  • getSuppressed

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now