@Override public void close() throws IOException { flush(); }
/** Copy the current contents of this buffer to output * byte array */ public void writeTo(byte[] bytes, int offset) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; int bytesUpto = offset; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } System.arraycopy(file.getBuffer(buffer++), 0, bytes, bytesUpto, length); bytesUpto += length; pos = nextPos; } }
/** Copy the current contents of this buffer to the provided {@link DataOutput}. */ public void writeTo(DataOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes(file.getBuffer(buffer++), length); pos = nextPos; } }
@Override public void close() throws IOException { flush(); }
@Override public void close() throws IOException { flush(); }
public void flush() throws IOException { ramIndexOutput.flush(); }
public void close() throws IOException { flush(); }
@Override public void close() throws IOException { flush(); }
@Override public void close() throws IOException { flush(); }
public void flush() throws IOException { ramIndexOutput.flush(); }
public void close() throws IOException { flush(); }
/** Copy the current contents of this buffer to the named output. */ public void writeTo(OutputStream out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes((byte[])file.buffers.elementAt(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to output * byte array */ public void writeTo(byte[] bytes, int offset) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; int bytesUpto = offset; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } System.arraycopy(file.getBuffer(buffer++), 0, bytes, bytesUpto, length); bytesUpto += length; pos = nextPos; } }
/** Copy the current contents of this buffer to output * byte array */ public void writeTo(byte[] bytes, int offset) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; int bytesUpto = offset; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } System.arraycopy(file.getBuffer(buffer++), 0, bytes, bytesUpto, length); bytesUpto += length; pos = nextPos; } }
/** Copy the current contents of this buffer to the named output. */ public void writeTo(IndexOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes((byte[])file.getBuffer(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to the provided {@link DataOutput}. */ public void writeTo(DataOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes(file.getBuffer(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to the named output. */ public void writeTo(IndexOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes((byte[])file.getBuffer(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to the named output. */ public void writeTo(IndexOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes(file.getBuffer(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to the provided {@link DataOutput}. */ public void writeTo(DataOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes(file.getBuffer(buffer++), length); pos = nextPos; } }
/** Copy the current contents of this buffer to the provided {@link DataOutput}. */ public void writeTo(DataOutput out) throws IOException { flush(); final long end = file.length; long pos = 0; int buffer = 0; while (pos < end) { int length = BUFFER_SIZE; long nextPos = pos + length; if (nextPos > end) { // at the last buffer length = (int)(end - pos); } out.writeBytes(file.getBuffer(buffer++), length); pos = nextPos; } }