docs: @Override
  	public boolean saveFile(final ITileSource pTileSource, final long pMapTileIndex,
  			final InputStream pStream, final Long pExpirationTime) {
  
  		final File file = getFile(pTileSource, pMapTileIndex);
  
  		if (Configuration.getInstance().isDebugTileProviders()){
  			Log.d(IMapView.LOGTAG, "TileWrite " + file.getAbsolutePath());
  		}
  		final File parent = file.getParentFile();
  		if (!parent.exists() && !createFolderAndCheckIfExists(parent)) {
  			return false;
  		}
  
  		BufferedOutputStream outputStream = null;
  		try {
  			outputStream = new BufferedOutputStream(new FileOutputStream(file.getPath()),
  					StreamUtils.IO_BUFFER_SIZE);
  			final long length = StreamUtils.copy(pStream, outputStream);
  
  			mUsedCacheSpace += length;
  			if (mUsedCacheSpace > Configuration.getInstance().getTileFileSystemCacheMaxBytes()) {
  				cutCurrentCache(); // TODO perhaps we should do this in the background
  			}
  		} catch (final IOException e) {
  			Counters.fileCacheSaveErrors++;
  			return false;
  		} finally {
  			if (outputStream != null) {
  				StreamUtils.closeStream(outputStream);
  			}
  		}
  		return true;
  	}