1 9 10 package org.jboss.util.stream; 11 12 import java.io.InputStream ; 13 14 22 public final class NullInputStream 23 extends InputStream 24 { 25 26 public static final NullInputStream INSTANCE = new NullInputStream(); 27 28 33 public int available() { 34 return 0; 35 } 36 37 40 public void mark(final int readLimit) { 41 } 42 43 48 public boolean markSupported() { 49 return false; 50 } 51 52 55 public void reset() { 56 } 57 58 61 public void close() { 62 } 63 64 69 public int read() { 70 return -1; 71 } 72 73 78 public int read(final byte bytes[], final int offset, final int length) { 79 return -1; 80 } 81 82 87 public int read(final byte bytes[]) { 88 return -1; 89 } 90 91 96 public long skip(final long n) { 97 return 0; 98 } 99 } 100 | Popular Tags |