code: private InputStream getPrivateKeyStream(String privateKey) throws LRException
      {
          try
          {
              // If the private key matches the form of a private key string, treat it as such
              if (privateKey.matches(pgpRegex))
              {
                  return new ByteArrayInputStream(privateKey.getBytes());
              }
              // Otherwise, treat it as a file location on the local disk
              else
              {
                  return new FileInputStream(new File(privateKey));
              }
          }
          catch (IOException e)
          {
              throw new LRException(LRException.NO_KEY_STREAM);
          }
      }
docs: Converts the local location or text of a private key into an input stream
  
  @param privateKey The local location or text of the private key for the digital signature
  @return Private key stream
  @throws LRException NO_KEY_STREAM if the private key cannot be turned into a stream