-public class CliReader {
- private Story story;
-
- /**
- * Create a new {@link CliReader} for a {@link Story} in the {@link Library}
- * .
- *
- * @param luid
- * the {@link Story} ID
- * @throws IOException
- * in case of I/O error
- */
- public CliReader(String luid) throws IOException {
- story = Instance.getLibrary().getStory(luid);
- if (story == null) {
- throw new IOException("Cannot retrieve story from library: " + luid);
- }
- }
-
- /**
- * Create a new {@link CliReader} for an external {@link Story}.
- *
- * @param source
- * the {@link Story} {@link URL}
- * @throws IOException
- * in case of I/O error
- */
- public CliReader(URL source) throws IOException {
- BasicSupport support = BasicSupport.getSupport(source);
- if (support == null) {
- throw new IOException("URL not supported: " + source.toString());
- }
-
- story = support.process(source);
- if (story == null) {
- throw new IOException(
- "Cannot retrieve story from external source: "
- + source.toString());
+class CliReader extends BasicReader {
+ public void read() throws IOException {
+ MetaData meta = getMeta();