我工作的蛋白质的DNA比对项目“readseq”。 其“flybase”包包含具有“CharToByteConverter的”类不编译并给出了“类型弃用”消息的Java代码。 (http://iubio.bio.indiana.edu/soft/molbio/readseq/java/)。 这里readseq源都可以找到我需要添加一些更多的功能到这个应用程序,不知道如何解决它朝我的目标前进。 我是那种在java中新国际展览局。 如果可能的话plz帮助。 Readseq是它的图形用户界面是容易获得净。 它只是给出转换字符数组为字节。 下面是一些关于它的信息:(docjar.com/docs/api/sun/io/CharToByteConverter.html)。 我不知道该怎么办这个被弃用。 它是用来作为下一个抽象类:
protected byte[] getBytes(CharToByteConverter ctb) {
ctb.reset();
int estLength = ctb.getMaxBytesPerChar() * count;
byte[] result = new byte[estLength];
int length;
try {
length = ctb.convert(value, offset, offset + count,
result, 0, estLength);
length += ctb.flush(result, ctb.nextByteIndex(), estLength);
} catch (CharConversionException e) {
length = ctb.nextByteIndex();
}
if (length < estLength) {
// A short format was used: Trim the byte array.
byte[] trimResult = new byte[length];
System.arraycopy(result, 0, trimResult, 0, length);
return trimResult;
}
else {
return result;
}
}