private void processEncoding(Command command, boolean hasParameter, int parameter)
   {
      String encoding = null;
      switch (command)
      {
         case ansi:
         {
            encoding = Encoding.ANSI_ENCODING;
            break;
         }

         case pc:
         {
            encoding = Encoding.PC_ENCODING;
            break;
         }

         case pca:
         {
            encoding = Encoding.PCA_ENCODING;
            break;
         }

         case mac:
         {
            encoding = Encoding.MAC_ENCODING;
            break;
         }

         case ansicpg:
         {
            encoding = hasParameter ? Encoding.LOCALEID_MAPPING.get(Integer.toString(unsignedValue(parameter))) : null;
            break;
         }

         default:
         {
            encoding = null;
            break;
         }
      }

      if (encoding == null)
      {
         throw new IllegalArgumentException("Unsupported encoding command " + command.getCommandName() + (hasParameter ? parameter : ""));
      }

      state.currentEncoding = encoding;
   }