Code example for ByteArrayEntity

Methods: setContentType

     * Create a string entity for the given content. 
    private ByteArrayEntity createEntity(byte[] data) {
        ByteArrayEntity entity = new ByteArrayEntity(data);
        return entity;
    private static class ServerThread extends Thread {
        private TestWebServer mServer;
        private ServerSocket mSocket;
        private boolean mIsSsl;
        private boolean mIsCancelled;
        private SSLContext mSslContext;
         * Defines the keystore contents for the server, BKS version. Holds just a 
         * single self-generated key. The subject name is "Test Server".