common/src/main/java/HTTPClient/Log.java
/**
     * Write the contents of the given buffer to the current log if logging for
     * the given facility is enabled.
     *
     * @param facility  the facility which is logging the message
     * @param prefix    the string with which to prefix the buffer contents;
     *                  may be null
     * @param buf       the buffer to dump
     */
Write the contents of the given buffer to the current log if logging for
the given facility is enabled.

@param facility  the facility which is logging the message
@param prefix    the string with which to prefix the buffer contents;
may be null
@param buf       the buffer to dump
Write the contents of the given buffer to the current log if logging for the given facility is enabled . @param facility the facility which is logging the message @param prefix the string with which to prefix the buffer contents ; may be null @param buf the buffer to dump
public static void write(int facility, String prefix, ByteArrayOutputStream buf)
    {
	if ((facMask & facility) == 0)
	    return;
	try
	{
	    writePrefix();
	    if (prefix != null)
		logWriter.write(prefix);
	    logWriter.write(NL);
	    logWriter.write(new String(buf.toByteArray(), "ISO_8859-1"));
	    logWriter.flush();
	}
	catch (IOException ioe)
	{
	    System.err.println("Failed to write to log: " + ioe);
	    System.err.println("Failed log Entry was: " + prefix);
	    System.err.println(new String(buf.toByteArray()));
	}
    }
public static void write ( int facility , String prefix , ByteArrayOutputStream buf ) { if ( ( facMask & facility ) == 0 ) return ; try { writePrefix ( ) ; if ( prefix != null ) logWriter . write ( prefix ) ; logWriter . write ( NL ) ; logWriter . write ( new String ( buf . toByteArray ( ) , "ISO_8859-1" ) ) ; logWriter . flush ( ) ; } catch ( IOException ioe ) { System . err . println ( "Failed to write to log: " + ioe ) ; System . err . println ( "Failed log Entry was: " + prefix ) ; System . err . println ( new String ( buf . toByteArray ( ) ) ) ; } }
Write the contents of the given buffer to the current log if logging for
 the given facility is enabled.
Write the contents of the given buffer to the current log if logging for the given facility is enabled .