class PickledGraphite implements GraphiteSender {

    @Override
    public void connect() throws IllegalStateException, IOException {
        if (isConnected()) {
            throw new IllegalStateException("Already connected");
        }
        InetSocketAddress address = this.address;
        if (address == null) {
            address = new InetSocketAddress(hostname, port);
        }
        if (address.getAddress() == null) {
            throw new UnknownHostException(address.getHostName());
        }

        this.socket = socketFactory.createSocket(address.getAddress(), address.getPort());
        this.writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), charset));
    }

    public  PickledGraphite(InetSocketAddress address);
    public  PickledGraphite(InetSocketAddress address, int batchSize);
    public  PickledGraphite(InetSocketAddress address, SocketFactory socketFactory, int batchSize);
    public  PickledGraphite(InetSocketAddress address, SocketFactory socketFactory, Charset charset, int batchSize);
    public  PickledGraphite(String hostname, int port);
    public  PickledGraphite(String hostname, int port, int batchSize);
    public  PickledGraphite(String hostname, int port, SocketFactory socketFactory, int batchSize);
    public  PickledGraphite(String hostname, int port, SocketFactory socketFactory, Charset charset, int batchSize);

}