public static byte[] stringDNAtoByte(final String dna){
  final byte[] dnaBytes=new byte[dna.length()];
  for (int i=0; i < dna.length(); i++) {
    dnaBytes[i]=(byte)getDNA(dna.charAt(i));
  }
  return dnaBytes;
}

public static byte [ ] stringDNAtoByte ( final String dna ) { final byte [ ] dnaBytes = new byte [ dna . length ( ) ] ; for ( int i = 0 ; i < dna . length ( ) ; i ++ ) { dnaBytes [ i ] = ( byte ) getDNA ( dna . charAt ( i ) ) ; } return dnaBytes ; }
convert a string containing valid nucleotide characters into a byte array with values ( 0 = n , . . . 4 = t ) .
