/** * Add the content of a {@link ConfigurationMetadataRepository} defined by the * specified {@link InputStream} json document using the specified {@link Charset}. If * this metadata repository holds items that were loaded previously, these are * ignored. * <p> * Leaves the stream open when done. * @param inputStream the source input stream * @param charset the charset of the input * @return this builder * @throws IOException in case of I/O errors */ public ConfigurationMetadataRepositoryJsonBuilder withJsonResource( InputStream inputStream, Charset charset) throws IOException { if (inputStream == null) { throw new IllegalArgumentException("InputStream must not be null."); } this.repositories.add(add(inputStream, charset)); return this; }