public static byte[] fromByteString(final String data) {
		final String[] parts = data.split("\\|");
		final byte[] bytes = new byte[parts.length];

		for (int i = 0; i < parts.length; ++i) {
			if (parts[i].length() != Byte.SIZE) {
				throw new IllegalArgumentException(
					"Byte value doesn't contain 8 bit: " + parts[i]
				);
			}

			try {
				bytes[parts.length - 1 - i] = (byte)parseInt(parts[i], 2);
			} catch (NumberFormatException e) {
				throw new IllegalArgumentException(e);
			}
		}

		return bytes;
	}
Convert a string which was created with the {@link #toByteString(byte...)}
method back to a byte array.

@see #toByteString(byte...)

@param data the string to convert.
@return the byte array.
@throws IllegalArgumentException if the given data string could not be
         converted.
jenetics/src/main/java/io/jenetics/internal/util/Bits.java