private byte[] getDataBinary(TextArea area) {
		String s = "";
		try {
			s = area.getDocument().getText(0, area.getDocument().getLength());
		}
		catch (BadLocationException e) {
			e.printStackTrace();
		}

		final int sLen = s.length();
		// 1/(Number of bits in a byte) times as many bytes as there are bits
		byte[] toReturn = new byte[(sLen + Byte.SIZE - 1) / Byte.SIZE];
		char c;
		for (int i = 0; i < sLen; i++) {
			if ((c = s.charAt(i)) == '1') {
				/*
				 * Add all the bits to the appropriate byte in the array. That
				 * is, for every bit that is 1, set that bit of toReturn at that
				 * the (1/Byte.SIZE)th position to 10000000 (logical) right
				 * shifted by the position in the byte.
				 */
				toReturn[i / Byte.SIZE] =
						(byte) (toReturn[i / Byte.SIZE] | (0x80 >>> (i % Byte.SIZE)));
			}
			else if (c != '0') {
				// TODO ignore this? should non-binary values not be allowed?
			}
		}
		return toReturn;

	}