charSeq2byteSeq -- convert a char[] to a byte[] for convenience

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1917 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-10-27 21:52:23 +00:00
parent 4192b093b8
commit be333da9c0
1 changed files with 9 additions and 0 deletions

View File

@ -410,6 +410,15 @@ public class BaseUtils {
}
return period;
}
public static byte[] charSeq2byteSeq(char[] seqIn) {
byte[] seqOut = new byte[seqIn.length];
for ( int i = 0; i < seqIn.length; i++ ) {
seqOut[i] = (byte)seqIn[i];
}
return seqOut;
}
}
/* code snippet for testing sequencePeriod():