Code example for CacheRequest

Methods: abort

0
            return new UnbufferedOutputStream(mCacheRequest.getBody());
        } 
 
        @Override 
        public void abort() { 
            mCacheRequest.abort();
        } 
    } 
 
    private static class TestResponseCache extends FileResponseCache { 
 
        private boolean mReadOnly;
 
        private boolean mBuffered = true;
 
        @Override 
        protected File getFile(URI uri, String requestMethod,
                Map<String, List<String>> requestHeaders, Object cookie) {
            // The cache file is always specified as the cookie. 
            if (cookie == null) {
                throw new NullPointerException();