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

com.ullink.FilterJson.groovy Maven / Gradle / Ivy

There is a newer version: 2.22
Show newest version
package com.ullink

public class FilterJson {
    StringWriter stringWriter = new StringWriter();
    boolean isAccepted = false;

    public  FilterJson(InputStream inputStream) {
        inputStream.filterLine(stringWriter, {
            if (!isAccepted && it.startsWith('{')) {
                isAccepted = true;
            }
            return isAccepted })
    }

    public String toString() {
        stringWriter.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy