/** * Merges 2 maps, without changing any of them. If map2 and map1 * have the same key for an entry, map1's value will be the one in * the merged map. */ protected static Map<?, ?> mergeMaps(Map<?, ?> map1, Map<?, ?> map2) { if (map1 == null || map1.isEmpty()) { return map2; } else if (map2 == null || map2.isEmpty()) { return map1; } else { return new ExtensibleURIConverterImpl.OptionsMap(map1, map2); } }
/** * Merges 2 maps, without changing any of them. If map2 and map1 * have the same key for an entry, map1's value will be the one in * the merged map. */ protected static Map<?, ?> mergeMaps(Map<?, ?> map1, Map<?, ?> map2) { if (map1 == null || map1.isEmpty()) { return map2; } else if (map2 == null || map2.isEmpty()) { return map1; } else { return new ExtensibleURIConverterImpl.OptionsMap(map1, map2); } }
Map<Object, Object> subOptions = new ExtensibleURIConverterImpl.OptionsMap(URIConverter.OPTION_REQUESTED_ATTRIBUTES, requestedSubAttributes, options); result.putAll(getURIConverter(subOptions).getAttributes(URI.createURI(getNestedURL()), subOptions));
Map<Object, Object> subOptions = new ExtensibleURIConverterImpl.OptionsMap(URIConverter.OPTION_REQUESTED_ATTRIBUTES, requestedSubAttributes, options); result.putAll(getURIConverter(subOptions).getAttributes(URI.createURI(getNestedURL()), subOptions));
public Map<String, ?> contentDescription(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).contentDescription(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).createInputStream(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).createOutputStream(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public void delete(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); getURIHandler(normalizedURI).delete(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public OutputStream createOutputStream(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).createOutputStream(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
@Override protected Map<?, ?> getContentDescriptionOptions() { return new ExtensibleURIConverterImpl.OptionsMap(ContentHandler.OPTION_REQUESTED_PROPERTIES, CONTENT_TYPE_REQUESTED_PROPERTIES, getLoadOptions()); } };
public void setAttributes(URI uri, Map<String, ?> attributes, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); getURIHandler(normalizedURI).setAttributes(normalizedURI, attributes, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public Map<String, ?> getAttributes(URI uri, Map<?, ?> options) { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).getAttributes(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public void delete(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); getURIHandler(normalizedURI).delete(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public Map<String, ?> getAttributes(URI uri, Map<?, ?> options) { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).getAttributes(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public boolean exists(URI uri, Map<?, ?> options) { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).exists(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public Map<String, ?> contentDescription(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).contentDescription(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
@Override protected Map<?, ?> getContentDescriptionOptions() { return new ExtensibleURIConverterImpl.OptionsMap(ContentHandler.OPTION_REQUESTED_PROPERTIES, CONTENT_TYPE_REQUESTED_PROPERTIES, getLoadOptions()); } };
public boolean exists(URI uri, Map<?, ?> options) { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).exists(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); return getURIHandler(normalizedURI).createInputStream(normalizedURI, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }
public void setAttributes(URI uri, Map<String, ?> attributes, Map<?, ?> options) throws IOException { URI normalizedURI = normalize(uri); getURIHandler(normalizedURI).setAttributes(normalizedURI, attributes, new OptionsMap(OPTION_URI_CONVERTER, this, options)); }