LoggerWriter.java
757 Bytes
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.slf4j.Logger
*/
package com.adobe.granite.threaddump.impl;
import java.io.IOException;
import java.io.Writer;
import org.slf4j.Logger;
final class LoggerWriter
extends Writer {
private final Logger logger;
public LoggerWriter(Logger logger) {
this.logger = logger;
}
public void close() throws IOException {
}
public void flush() throws IOException {
}
public void write(char[] cbuf, int off, int len) throws IOException {
if (len == 0) {
return;
}
char[] target = new char[len];
System.arraycopy(cbuf, off, target, 0, len);
this.logger.info(new String(target));
}
}