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

com.artemis.io.InputStreamHelper Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis.io;

import java.io.IOException;
import java.io.InputStream;

/**
 * InputStream bridge helper.
 *
 * @author Daan van Yperen
 */
public class InputStreamHelper {
	private InputStreamHelper() {}

	/** Reset input stream */
	public static void reset(InputStream is) throws IOException {
		is.reset();
	}

	/**
	 * Tests if this input stream supports the mark and
	 * reset methods. Whether or not mark and
	 * reset are supported is an invariant property of a
	 * particular input stream instance. The markSupported method
	 * of InputStream returns false.
	 *
	 * @return  true if this stream instance supports the mark
	 *          and reset methods; false otherwise.
	 * @see     InputStream#mark(int)
	 * @see     InputStream#reset()
	 */
	public static boolean isMarkSupported(InputStream is)
	{
		return is.markSupported();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy