Implement flush for InternalStream