Package net.sf.jlogmicro.util.logging

Examples of net.sf.jlogmicro.util.logging.Logger


      convTable[0x9D - 0x80] = 0x01;
      convTable[0x9E - 0x80] = 0x017E; //LATIN SMALL LETTER Z WITH CARON
      convTable[0x9F - 0x80] = 0x0178; //LATIN CAPITAL LETTER Y WITH DIAERESIS
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("initWinIsoConv", t);
      //#endif
    }
    return convTable;
  }
View Full Code Here


            break;
        }
      }
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("initUniWinConvx80", t);
      //#endif
    }
    return convTable;
  }
View Full Code Here

      } catch (UnsupportedEncodingException e) {
        //#ifdef DTEST
        System.out.println( "Unsupported encoding Cp1252");
        //#endif
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("EncodingUtil");
        logger.severe("UnsupportedEncodingException Cp1252", e);
        //#endif
        try {
          String convStr2 = new String(blftSgl, "Cp1252");
          rtn = convStr2.charAt(0) == CLEFT_SGL_QUOTE;
        } catch (UnsupportedEncodingException e2) {
          //#ifdef DTEST
          System.out.println( "Unsupported encoding WINDOWS-1252");
          //#endif
          //#ifdef DLOGGING
          logger.severe("UnsupportedEncodingException Cp1252", e2);
          //#endif
        }
      }
      //#ifdef DTEST
      System.out.println( "initConvWinUni()=" + rtn);
      //#endif
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("initConvWinUni", t);
      //#endif
    }
    return rtn;
  }
View Full Code Here

      } catch (UnsupportedEncodingException e) {
        //#ifdef DTEST
        System.out.println( "Unsupported encoding ISO8859_1");
        //#endif
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("EncodingUtil");
        logger.severe("initIsoEncoding UnsupportedEncodingException ISO8859_1", e);
        //#endif
        try {
          String convStr2 = new String("a".getBytes(), "ISO-8859-1");
          return "ISO-8859-1";
        } catch (UnsupportedEncodingException e2) {
          //#ifdef DTEST
          System.out.println("initIsoEncoding Unsupported encoding ISO-8859-1");
          //#endif
          //#ifdef DLOGGING
          logger.severe("initIsoEncoding UnsupportedEncodingException ISO-8859-1", e2);
          //#endif
        }
      }
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("initIsoEncoding initConvWinUni", t);
      //#endif
    }
    return "ISO8859_1";
  }
View Full Code Here

        m_statExcs.addElement(ce);
        //#ifdef DTEST
        System.out.println(ce.getMessage());
        //#endif
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("EncodingUtil");
        logger.severe(ce.getMessage(), e);
        //#endif
        try {
          String convStr2 = new String("a".getBytes(), "WINDOWS-1252");
          return "WINDOWS-1252";
        } catch (UnsupportedEncodingException e2) {
          CauseException ce2 = new CauseException(
              "initWinEncoding second " +
              "unsupportedEncodingException while " +
              " trying to convert encoding WINDOWS-1252.", e2);
          m_statExcs.addElement(ce2);
          //#ifdef DTEST
          System.out.println(ce2.getMessage());
          //#endif
          //#ifdef DLOGGING
          logger.severe(ce2.getMessage(), e2);
          //#endif
        }
      }
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("initWinEncoding() initConvWinUni", t);
      //#endif
    }
    return "Cp1252";
  }
View Full Code Here

      throw e;
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error while RssItem deserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error while RssItem deserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        }
View Full Code Here

        m_statExcs.addElement(ce);
        //#ifdef DTEST
        System.out.println(ce.getMessage());
        //#endif
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("EncodingUtil");
        logger.severe(ce.getMessage(), e);
        //#endif
        try {
          String convStr2 = new String("a".getBytes(), "WINDOWS-1252");
          return true;
        } catch (UnsupportedEncodingException e2) {
          CauseException ce2 = new CauseException(
              "initWinEncoding second " +
              "unsupportedEncodingException while " +
              " trying to convert encoding WINDOWS-1252.", e2);
          m_statExcs.addElement(ce2);
          //#ifdef DTEST
          System.out.println(ce2.getMessage());
          //#endif
          //#ifdef DLOGGING
          logger.severe(ce2.getMessage(), e2);
          //#endif
        }
      }
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("hasWinEncoding initConvWinUni", t);
      //#endif
    }
    return false;
  }
View Full Code Here

     
        } catch(Exception e) {
      CauseException ce = new CauseException(
          "Internal error while RssItem unencodedDeserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        } catch(OutOfMemoryError e) {
      CauseMemoryException ce = new CauseMemoryException(
          "Out of memory error while RssItem unencodedDeserialize ", e);
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("RssItem");
      logger.severe(ce.getMessage(), e);
      //#endif
            System.err.println(ce.getMessage() + " " + e.toString());
      e.printStackTrace();
      throw ce;
        }
View Full Code Here

      } catch (UnsupportedEncodingException e) {
        //#ifdef DTEST
        System.out.println( "Unsupported encoding ISO8859_1");
        //#endif
        //#ifdef DLOGGING
        Logger logger = Logger.getLogger("EncodingUtil");
        logger.severe("hasIso8859Encoding UnsupportedEncodingException ISO8859_1", e);
        //#endif
        try {
          String convStr2 = new String("a".getBytes(), "ISO-8859-1");
          return true;
        } catch (UnsupportedEncodingException e2) {
          //#ifdef DTEST
          System.out.println("hasIso8859Encoding Unsupported encoding ISO-8859-1");
          //#endif
          //#ifdef DLOGGING
          logger.severe("initIsoEncoding UnsupportedEncodingException ISO-8859-1", e2);
          //#endif
        }
      }
    } catch (Throwable t) {
      //#ifdef DLOGGING
      Logger logger = Logger.getLogger("EncodingUtil");
      logger.severe("hasIso8859Encoding initConvWinUni", t);
      //#endif
    }
    return false;
  }
View Full Code Here

     * @param text  Input parameter containing HTML tags (eg. <b>cat</b>)
     * @return      String without HTML tags (eg. cat)
     */
    public static String removeHtml(String text) {
    //#ifdef DLOGGING
    Logger logger = Logger.getLogger("StringUtil");
    boolean finerLoggable = logger.isLoggable(Level.FINER);
    //#endif
        try{
            int idx = text.indexOf('<');
            if (idx == -1) return text;
           
            StringBuffer plainText = new StringBuffer();
            String htmlText = text;
            int htmlStartIndex = htmlText.indexOf('<');
            if(htmlStartIndex == -1) {
                return text;
            }
            while (htmlStartIndex>=0) {
                plainText.append(htmlText.substring(0,htmlStartIndex));
                int htmlEndIndex = htmlText.indexOf('>', htmlStartIndex);
        // If we have unmatched '<' without '>' stop or we
        // get into infinate loop.
                if (htmlEndIndex < 0) {
          //#ifdef DLOGGING
          if (finerLoggable) {logger.finer("No end > for htmlStartIndex,htmlText=" + htmlStartIndex + "," + htmlText);}
          if (finerLoggable) {logger.finer("plainText=" + plainText);}
          //#endif
          break;
        }
                htmlText = htmlText.substring(htmlEndIndex+1);
                htmlStartIndex = htmlText.indexOf('<');
View Full Code Here

TOP

Related Classes of net.sf.jlogmicro.util.logging.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.