aQute.libg.remote.sink.Appender Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aQute.libg Show documentation
Show all versions of aQute.libg Show documentation
A library to be statically linked. Contains many small utilities. This bundle should not be installed in a framework, it is compile only.
package aQute.libg.remote.sink;
import java.io.IOException;
import aQute.libg.remote.Source;
class Appender implements Appendable {
final Source sources[];
final String areaId;
final boolean err;
Appender(Source[] sources, String areaId, boolean err) {
this.sources = sources;
this.err = err;
this.areaId = areaId;
}
@Override
public Appendable append(char ch) throws IOException {
return append(Character.toString(ch));
}
@Override
public Appendable append(CharSequence text) throws IOException {
for (Source source : sources) {
source.output(areaId, text, err);
}
return this;
}
@Override
public Appendable append(CharSequence text, int start, int end) throws IOException {
return append(text.subSequence(start, end));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy