+
+ public AlignmentI getRNAMLFor(final FileParse source) throws IOException
+ {
+ try
+ {
+ StringBuffer sb = new StringBuffer();
+
+ Reader fpr = source.getReader();
+ int p = 0;
+ char[] cbuff = new char[2048];
+ while ((p = fpr.read(cbuff)) > 0)
+ {
+ for (int i = 0; i < p; i++)
+ {
+ sb.append(cbuff[i]);
+ }
+ }
+ Iterator<Reader> r = jalview.ext.paradise.Annotate3D
+ .getRNAMLForPDBFileAsString(sb.toString());
+ AlignmentI al = null;
+ while (r.hasNext())
+ {
+ FileParse fp = new InputStreamParser(r.next(),
+ source.getDataName());
+ AlignmentI nal = new FormatAdapter().readFromFile(fp,
+ FileFormat.Rnaml);
+ if (al == null)
+ {
+ al = nal;
+ }
+ else
+ {
+ al.append(nal);
+ }
+ }
+ return al;
+ } catch (Throwable x)
+ {
+ if (x instanceof IOException)
+ {
+ throw ((IOException) x);
+ }
+ else
+ {
+ throw new IOException(MessageManager.getString(
+ "exception.unexpected_handling_rnaml_translation_for_pdb"),
+ x);
+ }
+ }
+ }
+