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

com.volcengine.ark.runtime.utils.SSE Maven / Gradle / Ivy

There is a newer version: 0.1.144
Show newest version
package com.volcengine.ark.runtime.utils;

public class SSE {
    private static final String DONE_DATA = "[DONE]";
    
    private final String data;

    public SSE(String data){
        this.data = data;
    }

    public String getData(){
        return this.data;
    }

    public byte[] toBytes(){
        return String.format("data: %s\n\n", this.data).getBytes();
    }

    public boolean isDone(){
        return DONE_DATA.equalsIgnoreCase(this.data);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy