Java PushbackInputStream .markSupported ()
Syntax
PushbackInputStream.markSupported() has the following syntax.
public boolean markSupported()
Example
In the following code shows how to use PushbackInputStream.markSupported() method.
//w ww . jav a2 s . co m
import java.io.*;
public class Main {
public static void main(String[] args) {
byte[] arrByte = new byte[1024];
byte[] byteArray = new byte[]{'j', 'a', 'v', 'a', '2','s','.','c','o','m'};
InputStream is = new ByteArrayInputStream(byteArray);
PushbackInputStream pis = new PushbackInputStream(is);
System.out.println(pis.markSupported());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.io »
Java Tutorial »
java.io »