@Override public void mark(int arg0) { getByteArrayInputStream().mark(arg0); }
bais.mark(bais.available()); Record txn = null; switch (hdr.getType()) {
bais.mark(bais.available()); Record txn = null; switch (hdr.getType()) {
stream.mark(0); int peekInt = stream.read(); byte peekByte = (byte) peekInt; stream.mark(0); // Current position peekInt = stream.read(); peekByte = (byte) peekInt; stream.mark(0); int posBefore = stream.available(); stream.mark(0); int prevOctet = 1; int curOctet; stream.mark(0); peekInt = stream.read(); peekByte = (byte) peekInt; while (peekInt != -1 && (peekByte == (byte) 0xFF || peekByte == (byte) 0x00)) { stream.mark(0); peekInt = stream.read(); peekByte = (byte) peekInt;
buf.append("\n"); if (stream.available() == 2) { stream.mark(0); byte[] value = new byte[2]; try {
@Override public synchronized void mark(int readlimit) { bais.mark(readlimit); } }
@Override public synchronized void mark(int readlimit) { bais.mark(readlimit); } }
@Override public synchronized void mark(int readlimit) { this.cachedStream.mark(readlimit); }
public int mark() { super.mark(0); return super.pos; }
@Override public void mark(int readlimit) { stream.mark(readlimit); }
@Override public void mark(int i) { in.mark(i); }
/** * Marks the current position. */ public void mark() { buffer.mark(buffer.available()); }
ByteArrayInputStream is = new ByteArrayInputStream("Hello World!!".getBytes()); if(is.markSupported()){ is.mark("Hello World!!".length()); } System.out.println(getStreamContent(is)); is.reset(); System.out.println("Printed once"); System.out.println(getStreamContent(is));
@Override public void recoveryAction(OperationContext context) throws IOException { blockListInputStream.reset(); blockListInputStream.mark(Constants.MAX_MARK_LENGTH); } };
@Override public void recoveryAction(OperationContext context) throws IOException { sendStream.reset(); sendStream.mark(Constants.MAX_MARK_LENGTH); } };
@Override public void recoveryAction(OperationContext context) throws IOException { blockListInputStream.reset(); blockListInputStream.mark(Constants.MAX_MARK_LENGTH); } };
@Override public void recoveryAction(OperationContext context) throws IOException { sendStream.reset(); sendStream.mark(Constants.MAX_MARK_LENGTH); } };
@Override public void recoveryAction(OperationContext context) throws IOException { sendStream.reset(); sendStream.mark(Constants.MAX_MARK_LENGTH); } };
public static RestartableInputStream wrap(byte[] b) { ByteArrayInputStream input = new ByteArrayInputStream(b); input.mark(b.length); return new RestartableResettableInputStream(input); } }
@Override public synchronized void mark(int readlimit) { try { getDataStream().mark(readlimit); } catch (IOException e) { throw new RuntimeException(e.getMessage(),e); } }