private static void getPublicKey()
	{
		FileInputStream keyfis = null;
		byte[] encKey;
		try {
			//read in from file
			keyfis = new FileInputStream("publicKey.txt");
			encKey = new byte[keyfis.available()];
			keyfis.read(encKey);

			keyfis.close();
			
			//convert bytes to PublicKey
			X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(encKey);
			KeyFactory keyFactory = KeyFactory.getInstance("RSA");
			serverPublicKey = keyFactory.generatePublic(pubKeySpec);
		
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		} catch (InvalidKeySpecException e) {
			e.printStackTrace();
		}
	}