'Read and parse a data table and return as a Table.
This function provides the Table interface to the astropy unified I/O
layer.  This allows easily reading a file in many supported data formats
using syntax such as::
>>> from astropy.table import Table
>>> dat = Table.read(\'table.dat\', format=\'ascii\')
>>> events = Table.read(\'events.fits\', format=\'fits\')
The arguments and keywords (other than ``format``) provided to this function are
passed through to the underlying data reader (e.g. `~astropy.io.ascii.read`).'

@classmethod
def read(cls, *args, **kwargs):

    out = io_registry.read(cls, *args, **kwargs)
    if (cls is not out.__class__):
        try:
            out = cls(out, copy=False)
        except Exception:
            raise TypeError(u'could    not    convert    reader    output    to    {0}    class.'.format(cls.__name__))
    return out
