Package org.wmn4j.io

Interface ScoreReader

All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
MusicXmlReader

public interface ScoreReader extends Closeable
Represents a reader for music notation files. The only supported file type is MusicXML.

ScoreReader implementations are expected to be single use: for reading separate scores, separate instances need to be used. Implementations of this interface are not guaranteed to be thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a score with the contents of the music notation file defined by the path set in this reader.
    Returns a score builder with the contents of the music notation file defined by the path set in this reader.

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • readScore

      Returns a score with the contents of the music notation file defined by the path set in this reader.
      Returns:
      aa score with the contents of the music notation file defined by the path set in this reader
      Throws:
      IOException - if the file is not found or reading the file fails
      ParsingFailureException - if the file cannot be parsed
    • readScoreBuilder

      Returns a score builder with the contents of the music notation file defined by the path set in this reader.
      Returns:
      a score builder with the contents of the music notation file defined by the path set in this reader
      Throws:
      IOException - if the file is not found or reading the file fails
      ParsingFailureException - if the file cannot be parsed