예제 #1
0
파일: ImapProxy.java 프로젝트: koem/Zimbra
  private ImapConnection writeRequest(final byte[] payload) throws IOException {
    ImapConnection conn = mConnection;
    if (conn == null) throw new IOException("proxy connection already closed");

    // proxy the request over to the remote server
    OutputStream remote = conn.getOutputStream();
    if (remote == null) {
      dropConnection();
      throw new IOException("proxy connection already closed");
    }
    remote.write(payload);
    remote.flush();

    return conn;
  }