docs: protected void copy(final CacheEntry cacheEntry, final InputStream is, final PrintWriter writer) throws IOException {
  		IOException exception = null;
  
  		InputStream resourceInputStream = null;
  		final Resource resource = cacheEntry.getResource();
  		if (resource != null) {
  			resourceInputStream = resource.streamContent();
  		} else {
  			resourceInputStream = is;
  		}
  
  		Reader reader;
  		final String fileEncoding = getFileEncoding();
  		if (fileEncoding == null) {
  			reader = new InputStreamReader(resourceInputStream);
  		} else {
  			reader = new InputStreamReader(resourceInputStream, fileEncoding);
  		}
  
  		// Copy the input stream to the output stream
  		exception = copyRange(reader, writer);
  
  		// Clean up the reader
  		reader.close();
  
  		// Rethrow any exception that has occurred
  		if (exception != null)
  			throw exception;
  	}