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

org.nutz.mock.servlet.multipart.inputing.StreamEndlInputing Maven / Gradle / Ivy

Go to download

Nutz, which is a collections of lightweight frameworks, each of them can be used independently

There is a newer version: 1.r.72
Show newest version
package org.nutz.mock.servlet.multipart.inputing;

import java.io.IOException;

public class StreamEndlInputing implements Inputing {

	private static final int[] ary = {'-', '-', '\r', '\n'};

	private int index;

	public StreamEndlInputing() {
		index = 0;
	}

	public int read() {
		if (index < ary.length)
			return ary[index++];
		return -1;
	}

	public long size() {
		return 4;
	}

	public void close() throws IOException {}

	public void init() throws IOException {}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy