All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstreetmap.atlas.streaming.StringOutputStream Maven / Gradle / Ivy

There is a newer version: 7.0.8
Show newest version
package org.openstreetmap.atlas.streaming;

import java.io.IOException;
import java.io.OutputStream;

/**
 * {@link OutputStream} backed by a {@link StringBuilder}
 *
 * @author matthieun
 */
public class StringOutputStream extends OutputStream
{
    private final StringBuilder builder = new StringBuilder();

    @Override
    public String toString()
    {
        return this.builder.toString();
    }

    @Override
    public void write(final int byteValue) throws IOException
    {
        this.builder.append(String.valueOf((char) byteValue));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy