public static CitationRecord read(InputStream is) throws IOException
		{
		CitationRecord rec=new CitationRecord();
		String file=LabnoteUtil.readStreamToString(is);
		
		String[] lines=file.split("\\r\\n");
		LinkedList<String> nlines=new LinkedList<String>();
		for(String s:lines)
			nlines.add(s);
		
		while(!nlines.isEmpty())
			{
			String line=nlines.removeFirst();
			String linetype=line.substring(0, 2);
			
			if(!line.substring(2,2+4).equals("  - "))
				throw new IOException("Bad separator - not a RIS file");
			String therest=line.substring(2+4);
			

			if(linetype.equals("ER"))
				break;
			else if(linetype.equals("TY"))
				{
				if(therest.equals("ABST") || therest.equals("INPR") || therest.equals("JFULL") || therest.equals("JOUR"))
					{
					parseJournalArticle(rec, nlines);
					//Set type
					rec.setType(CitationRecord.TYPE_ARTICLE);
					}
				}
				
			
			
			}
		
		
		return rec;
		}