public HDFSWriter getWriter(String fileType) throws IOException {
if (fileType == BadSequenceFileType) {
return new HDFSBadSeqWriter();
} else if (fileType == BadDataStreamType) {
return new HDFSBadDataStream();
} else {
throw new IOException("File type " + fileType + " not supported");
}
}