Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.apache.maven.artifact.repository.metadata.io;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
Handles deserialization of metadata from some kind of textual format like XML.

Author(s):
Benjamin Bentmann
public interface MetadataReader
{

    
The key for the option to enable strict parsing. This option is of type java.lang.Boolean and defaults to true. If false, unknown elements will be ignored instead of causing a failure.
    String IS_STRICT = "org.apache.maven.artifact.repository.metadata.io.isStrict";

    
Reads the metadata from the specified file.

Parameters:
input The file to deserialize the metadata from, must not be null.
options The options to use for deserialization, may be null to use the default values.
Returns:
The deserialized metadata, never null.
Throws:
java.io.IOException If the metadata could not be deserialized.
MetadataParseException If the input format could not be parsed.
    Metadata readFile inputMap<String, ?> options )
        throws IOExceptionMetadataParseException;

    
Reads the metadata from the specified character reader. The reader will be automatically closed before the method returns.

Parameters:
input The reader to deserialize the metadata from, must not be null.
options The options to use for deserialization, may be null to use the default values.
Returns:
The deserialized metadata, never null.
Throws:
java.io.IOException If the metadata could not be deserialized.
MetadataParseException If the input format could not be parsed.
    Metadata readReader inputMap<String, ?> options )
        throws IOExceptionMetadataParseException;

    
Reads the metadata from the specified byte stream. The stream will be automatically closed before the method returns.

Parameters:
input The stream to deserialize the metadata from, must not be null.
options The options to use for deserialization, may be null to use the default values.
Returns:
The deserialized metadata, never null.
Throws:
java.io.IOException If the metadata could not be deserialized.
MetadataParseException If the input format could not be parsed.
    Metadata readInputStream inputMap<String, ?> options )
        throws IOExceptionMetadataParseException;
New to GrepCode? Check out our FAQ X