Reverted back to original code as the new checks were causing other file
formats to break.  The new InputStream class is still present for now,
but has been marked Deprecated.