code: public static void writeToOutputStream(Structure structure, OutputStream outputStream) throws IOException{
  		// Set up this writer
  		AdapterToStructureData writerToEncoder = new AdapterToStructureData();
  		// Get the writer - this is what people implement
  		new MmtfStructureWriter(structure, writerToEncoder);
  		// Now write this data to file
  		byte[] outputBytes = WriterUtils.getDataAsByteArr(writerToEncoder);
  		outputStream.write(outputBytes,0,outputBytes.length);
  	}
docs: Write a Structure object to an {@link OutputStream}
  @param structure the Structure to write
  @param outputStream the {@link OutputStream} to write to
  @throws IOException an error transferring the byte[]