package de.siphalor.was.dummy;

import de.siphalor.was.content.resource.Resource;
import org.jetbrains.annotations.Nullable;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

public class DummyResource extends Resource {
	public final String value;

	protected DummyResource(String id, String value) {
		super(id);
		this.value = value;
	}

	@Override
	public @Nullable InputStream getInputStream() {
		return new ByteArrayInputStream(value.getBytes(StandardCharsets.UTF_8));
	}
}
