comparison src/org/eclipse/jetty/util/StringUtil.java @ 820:8e9db0bbf4f9

remove org.eclipse.jetty.util.log and upgrade slf4j
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 13 Sep 2016 23:13:06 -0600
parents 3428c60d7cfc
children 3242aff51053
comparison
equal deleted inserted replaced
819:17bd0b170ed6 820:8e9db0bbf4f9
19 package org.eclipse.jetty.util; 19 package org.eclipse.jetty.util;
20 20
21 import java.io.UnsupportedEncodingException; 21 import java.io.UnsupportedEncodingException;
22 import java.nio.charset.Charset; 22 import java.nio.charset.Charset;
23 23
24 import org.eclipse.jetty.util.log.Log; 24 import org.slf4j.Logger;
25 import org.eclipse.jetty.util.log.Logger; 25 import org.slf4j.LoggerFactory;
26 26
27 /** Fast String Utilities. 27 /** Fast String Utilities.
28 * 28 *
29 * These string utilities provide both conveniance methods and 29 * These string utilities provide both conveniance methods and
30 * performance improvements over most standard library versions. The 30 * performance improvements over most standard library versions. The
33 * 33 *
34 * 34 *
35 */ 35 */
36 public class StringUtil 36 public class StringUtil
37 { 37 {
38 private static final Logger LOG = Log.getLogger(StringUtil.class); 38 private static final Logger LOG = LoggerFactory.getLogger(StringUtil.class);
39 39
40 public static final String ALL_INTERFACES="0.0.0.0"; 40 public static final String ALL_INTERFACES="0.0.0.0";
41 public static final String CRLF="\015\012"; 41 public static final String CRLF="\015\012";
42 public static final String __LINE_SEPARATOR= 42 public static final String __LINE_SEPARATOR=
43 System.getProperty("line.separator","\n"); 43 System.getProperty("line.separator","\n");
377 { 377 {
378 return s.getBytes(__ISO_8859_1); 378 return s.getBytes(__ISO_8859_1);
379 } 379 }
380 catch(Exception e) 380 catch(Exception e)
381 { 381 {
382 LOG.warn(e); 382 LOG.warn("",e);
383 return s.getBytes(); 383 return s.getBytes();
384 } 384 }
385 } 385 }
386 386
387 public static byte[] getBytes(String s,String charset) 387 public static byte[] getBytes(String s,String charset)
390 { 390 {
391 return s.getBytes(charset); 391 return s.getBytes(charset);
392 } 392 }
393 catch(Exception e) 393 catch(Exception e)
394 { 394 {
395 LOG.warn(e); 395 LOG.warn("",e);
396 return s.getBytes(); 396 return s.getBytes();
397 } 397 }
398 } 398 }
399 399
400 400