code: public static final double parseField(byte[] bytes, int startPos, int length, char delimiter) {
  		if (length <= 0) {
  			throw new NumberFormatException("Invalid input: Empty string");
  		}
  		int i = 0;
  		final byte delByte = (byte) delimiter;
  		
  		while (i < length && bytes[i] != delByte) {
  			i++;
  		}
  		
  		String str = new String(bytes, startPos, i);
  		return Double.parseDouble(str);
  	}
docs: Static utility to parse a field of type double from a byte sequence that represents text characters
  (such as when read from a file stream).
  
  @param bytes The bytes containing the text data that should be parsed.
  @param startPos The offset to start the parsing.
  @param length The length of the byte sequence (counting from the offset).
  @param delimiter The delimiter that terminates the field.
  
  @return The parsed value.
  
  @throws NumberFormatException Thrown when the value cannot be parsed because the text represents not a correct number.