code: @Override public ProjectFile read(InputStream inputStream) throws MPXJException
     {
        try
        {
           BufferedInputStream is = new BufferedInputStream(inputStream);
           is.mark(100);
           byte[] buffer = new byte[SQLITE_TEXT.length()];
           is.read(buffer);
           is.reset();
           String actualText = new String(buffer);
           ProjectFile result;
           if (SQLITE_TEXT.equals(actualText))
           {
              result = readDatabaseFile(is);
           }
           else
           {
              result = readTextFile(is);
           }
           return result;
        }
  
        catch (IOException ex)
        {
           throw new MPXJException("Failed to read file", ex);
        }
     }
docs: {@inheritDoc}