From: Jim Procter Date: Fri, 26 Jun 2015 16:21:58 +0000 (+0100) Subject: JAL-1705 - allow a FileParse to be constructed directly from a reader for direct... X-Git-Tag: Release_2_10_0~296^2~90^2~18 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fbed706fbf25c2f7a5b3f3ba9b2b44737c411dcc;p=jalview.git JAL-1705 - allow a FileParse to be constructed directly from a reader for direct reading of HTTP client streams --- diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index 9228257..2221312 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -269,6 +269,30 @@ public class FileParse } /** + * not for general use, creates a fileParse object for an existing reader with + * configurable values for the origin and the type of the source + */ + public FileParse(BufferedReader source, String originString, + String typeString) + { + type = typeString; + error = false; + inFile = null; + dataName = originString; + dataIn = source; + try + { + if (dataIn.markSupported()) + { + dataIn.mark(READAHEAD_LIMIT); + } + } catch (IOException q) + { + + } + } + + /** * Create a datasource for input to Jalview. See AppletFormatAdapter for the * types of sources that are handled. *