OSDN Git Service

Merge commit 'cbf79f1f735efd8eacdb6f10beb9c2705225ac30'
[jindolf/JinArchiver.git] / src / main / java / jp / sourceforge / jindolf / archiver / MultiPlexer.java
diff --git a/src/main/java/jp/sourceforge/jindolf/archiver/MultiPlexer.java b/src/main/java/jp/sourceforge/jindolf/archiver/MultiPlexer.java
deleted file mode 100644 (file)
index 46cfd52..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*\r
- * Multiplex Writer\r
- *\r
- * Copyright(c) 2008 olyutorskii\r
- */\r
-\r
-package jp.sourceforge.jindolf.archiver;\r
-\r
-import java.io.IOException;\r
-import java.io.Writer;\r
-import java.util.Collections;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-/**\r
- * Writerのマルチプレクサ。\r
- */\r
-public class MultiPlexer extends Writer{\r
-\r
-    private final List<Writer> childs = new LinkedList<Writer>();\r
-\r
-    /**\r
-     * コンストラクタ。\r
-     */\r
-    public MultiPlexer(){\r
-        this(null);\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * コンストラクタ。\r
-     * @param writer 初期Writer\r
-     */\r
-    public MultiPlexer(Writer writer){\r
-        super();\r
-\r
-        if(writer != null){\r
-            this.childs.add(writer);\r
-        }\r
-\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * Writerを追加する。\r
-     * @param writer 追加するWriter。nullなら無視。\r
-     */\r
-    public void addWriter(Writer writer){\r
-        if(writer == null) return;\r
-        this.childs.add(writer);\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * 出力するWriterの一覧を得る。\r
-     * @return Writer一覧。\r
-     */\r
-    public List<Writer> getWriterList(){\r
-        return Collections.unmodifiableList(this.childs);\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void close() throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.close();\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void flush() throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.flush();\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param cbuf {@inheritDoc}\r
-     * @param off {@inheritDoc}\r
-     * @param len {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void write(char[] cbuf, int off, int len) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.write(cbuf, off, len);\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param csq {@inheritDoc}\r
-     * @return {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public Writer append(CharSequence csq) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.append(csq);\r
-        }\r
-        return this;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param csq {@inheritDoc}\r
-     * @param start {@inheritDoc}\r
-     * @param end {@inheritDoc}\r
-     * @return {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public Writer append(CharSequence csq, int start, int end)\r
-            throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.append(csq, start, end);\r
-        }\r
-        return this;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param c {@inheritDoc}\r
-     * @return {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public Writer append(char c) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.append(c);\r
-        }\r
-        return this;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param c {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void write(int c) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.write(c);\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param cbuf {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void write(char[] cbuf) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.write(cbuf);\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param str {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void write(String str) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.write(str);\r
-        }\r
-        return;\r
-    }\r
-\r
-    /**\r
-     * {@inheritDoc}\r
-     * @param str {@inheritDoc}\r
-     * @param off {@inheritDoc}\r
-     * @param len {@inheritDoc}\r
-     * @throws IOException {@inheritDoc}\r
-     */\r
-    @Override\r
-    public void write(String str, int off, int len) throws IOException{\r
-        for(Writer writer : this.childs){\r
-            writer.write(str, off, len);\r
-        }\r
-        return;\r
-    }\r
-\r
-}\r