private void writeID ( String contents , String currentID ) throws IOException { String localName = getLocalFileName ( currentID ) ; try ( PrintWriter pw = new PrintWriter ( new GZIPOutputStream ( new FileOutputStream ( localName ) ) ) ) { pw . print ( contents ) ; pw . flush ( ) ; } }
Output chemical contents to a file