-/**
- *
- */
-package uk.ac.vamsas.client;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.jar.JarInputStream;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * @author jimp
- * LATER: this may not be a necessary or useful class to return from IClientAppdata get*InputStream() methods
- */
-public class AppDataInputStream extends DataInputStream implements DataInput {
- private Log log = LogFactory.getLog(AppDataInputStream.class);
- private boolean isOpen = false;
- /**
- * Wrapper for writing to/from AppData Entries in a Vamsas Document.
- */
- public AppDataInputStream(InputStream inputstream) {
- super(inputstream);
- isOpen=true;
- }
-
- /* (non-Javadoc)
- * @see java.io.FilterInputStream#close()
- */
- public void close() throws IOException {
- if (!isOpen) {
- log.debug("close() called on closed AppDataInputStream.");
- // throw new IOException("Attempt to close an already closed AppDataInputStream");
- } else {
- isOpen=false;
- }
- }
-
- /**
- * Will return zero if stream has been closed.
- * @see java.io.FilterInputStream#available()
- */
- public int available() throws IOException {
- if (isOpen)
- return super.available();
- else
- return 0;
- }
-
-}
+/*\r
+ * This file is part of the Vamsas Client version 0.1. \r
+ * Copyright 2009 by Jim Procter, Iain Milne, Pierre Marguerite, \r
+ * Andrew Waterhouse and Dominik Lindner.\r
+ * \r
+ * Earlier versions have also been incorporated into Jalview version 2.4 \r
+ * since 2008, and TOPALi version 2 since 2007.\r
+ * \r
+ * The Vamsas Client is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ * \r
+ * The Vamsas Client is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public License\r
+ * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.\r
+ */\r
+package uk.ac.vamsas.client;\r
+\r
+import java.io.DataInput;\r
+import java.io.DataInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.util.jar.JarInputStream;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+\r
+/**\r
+ * @author jimp LATER: this may not be a necessary or useful class to return\r
+ * from IClientAppdata get*InputStream() methods\r
+ */\r
+public class AppDataInputStream extends DataInputStream implements DataInput {\r
+ private Log log = LogFactory.getLog(AppDataInputStream.class);\r
+\r
+ private boolean isOpen = false;\r
+\r
+ /**\r
+ * Wrapper for writing to/from AppData Entries in a Vamsas Document.\r
+ */\r
+ public AppDataInputStream(InputStream inputstream) {\r
+ super(inputstream);\r
+ isOpen = true;\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see java.io.FilterInputStream#close()\r
+ */\r
+ public void close() throws IOException {\r
+ if (!isOpen) {\r
+ log.debug("close() called on closed AppDataInputStream.");\r
+ // throw new\r
+ // IOException("Attempt to close an already closed AppDataInputStream");\r
+ } else {\r
+ isOpen = false;\r
+ }\r
+ }\r
+\r
+ /**\r
+ * Will return zero if stream has been closed.\r
+ * \r
+ * @see java.io.FilterInputStream#available()\r
+ */\r
+ public int available() throws IOException {\r
+ if (isOpen)\r
+ return super.available();\r
+ else\r
+ return 0;\r
+ }\r
+\r
+}\r