code: static String convertScanToString(Scan scan) throws IOException {
  		ByteArrayOutputStream out = new ByteArrayOutputStream();
  		DataOutputStream dos = new DataOutputStream(out);
  		scan.write(dos);
  		return Base64.encodeBytes(out.toByteArray());
  	}
docs: Writes the given scan into a Base64 encoded string.
  
  @param scan
  The scan to write out.
  @return The scan saved in a Base64 encoded string.
  @throws IOException
  When writing the scan fails.