testURL = "http://www.broadinstitute.org/igvdata/annotations/seq/hg19/chr12.txt";
}
byte[] expectedBytes = {'T', 'C', 'G', 'C', 'T', 'T', 'G', 'A', 'A', 'C', 'C', 'C', 'G', 'G',
'G', 'A', 'G', 'A', 'G', 'G'};
IGVSeekableHTTPStream str = null;
try {
str = new IGVSeekableHTTPStream(new URL(testURL));
str.seek(25350000);
byte[] buffer = new byte[80000];
str.read(buffer);
String result = new String(buffer);
for (int i = 0; i < expectedBytes.length; i++) {
if (buffer[i] != expectedBytes[i]) {
return false;
}
}
return true;
} finally {
if (str != null) str.close();
}
}