public void flush() throws IOException { super.flush(); byte[] bytes = toByteArray(); if (bytes.length == 0) return; String msg = new String(bytes); if (msg.indexOf(_sep) != -1) { // break up the message based on the line separator; this // may be because the flushed buffer contains mutliple lines for (StringTokenizer tok = new StringTokenizer(msg, _sep); tok.hasMoreTokens();) { String next = tok.nextToken(); log(next); } // clear the internally held byte array reset(); } }
public void flush() throws IOException { super.flush(); byte[] bytes = toByteArray(); if (bytes.length == 0) return; String msg = new String(bytes); if (msg.indexOf(_sep) != -1) { // break up the message based on the line separator; this // may be because the flushed buffer contains mutliple lines for (StringTokenizer tok = new StringTokenizer(msg, _sep); tok.hasMoreTokens();) { String next = tok.nextToken(); log(next); } // clear the internally held byte array reset(); } }
public void flush() throws IOException { super.flush(); byte[] bytes = toByteArray(); if (bytes.length == 0) return; String msg = new String(bytes); if (msg.indexOf(_sep) != -1) { // break up the message based on the line separator; this // may be because the flushed buffer contains mutliple lines for (StringTokenizer tok = new StringTokenizer(msg, _sep); tok.hasMoreTokens();) { String next = tok.nextToken(); log(next); } // clear the internally held byte array reset(); } }
public void flush() throws IOException { super.flush(); byte[] bytes = toByteArray(); if (bytes.length == 0) return; String msg = new String(bytes); if (msg.indexOf(_sep) != -1) { // break up the message based on the line separator; this // may be because the flushed buffer contains mutliple lines for (StringTokenizer tok = new StringTokenizer(msg, _sep); tok.hasMoreTokens();) { String next = tok.nextToken(); log(next); } // clear the internally held byte array reset(); } }