CustomInputStream  migrated to unified