public static DemoIndex indexForFile(String fileName, Profile... profile) throws IOException {
return new DemoIndex(iteratorForFile(fileName, profile));
}
public static CDemoFileInfo infoForStream(InputStream stream) throws IOException {
DemoInputStream s = null;
try {
s = demoInputStreamForStream(stream, Profile.FILE_INFO);
s.skipToFileInfo();
return (CDemoFileInfo) s.read().getMessage();
} finally {
if (s != null) {
s.close();
}
}
}