code: public String[] lscat()
          throws IOException, CDDBException
      {
          // sanity check
          if (_sock == null) {
              throw new CDDBException(500, "Not connected");
          }
  
          // make the request
          Response rsp = request("cddb lscat");
  
          // anything other than an OK response earns an exception
          if (rsp.code != 210) {
              throw new CDDBException(rsp.code, rsp.message);
          }
  
          ArrayList<String> list = new ArrayList<String>();
          String input;
          while (!(input = _in.readLine()).equals(CDDBProtocol.TERMINATOR)) {
              list.add(input);
          }
  
          String[] categories = new String[list.size()];
          list.toArray(categories);
          return categories;
      }
docs: Fetches and returns the list of categories supported by the server.
  
  @throws IOException if a problem occurs chatting to the server.
  @throws CDDBException if the server responds with an error.