class RpcStreamConnection extends RpcConnection {

    int continueReadIfGetPartialRead(@Nonnull final byte[] preambleBytes,
            final int bytesRead, @Nonnull final AtomicLong streamRecvs)
            throws IOException, ConnectionException {
        int totalBytesRead = bytesRead;
        while ((totalBytesRead >= 0) && (totalBytesRead < preambleBytes.length)) {
            int moreBytesRead = topInputStream.read(preambleBytes, totalBytesRead,
                    preambleBytes.length - totalBytesRead);
            throwConnectionExceptionIfConditionFails(moreBytesRead >= 0,
                    "server connection unexpectedly closed");

            streamRecvs.incrementAndGet();
            totalBytesRead += moreBytesRead;
        }
        return totalBytesRead;
    }

    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
                               ServerStats stats, P4Charset p4Charset, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, boolean secure);
    private  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure);
    public  RpcStreamConnection(String serverHost, int serverPort, Properties props,
            ServerStats stats, P4Charset p4Charset, Socket socket, RpcSocketPool pool, boolean secure,
            String rsh);

}