@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
@Override public void setLength(final long newLength) throws IOException { this.file.resize(newLength); this.buf = this.file.getData().getContent(); } }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { final RamFileData data = this.file.getData(); final int size = data.size(); final int newSize = size + len; // Store the Exception in order to notify the client again on close() try { this.file.resize(newSize); } catch (final IOException e) { this.exception = e; throw e; } System.arraycopy(b, off, data.getContent(), size, len); }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { final RamFileData data = this.file.getData(); final int size = data.size(); final int newSize = size + len; // Store the Exception in order to notify the client again on close() try { this.file.resize(newSize); } catch (final IOException e) { this.exception = e; throw e; } System.arraycopy(b, off, data.getContent(), size, len); }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { final RamFileData data = this.file.getData(); final int size = data.size(); final int newSize = size + len; // Store the Exception in order to notify the client again on close() try { this.file.resize(newSize); } catch (final IOException e) { this.exception = e; throw e; } System.arraycopy(b, off, data.getContent(), size, len); }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { if (this.getLeftBytes() < len) { final int newSize = this.buf.length + len - this.getLeftBytes(); this.file.resize(newSize); this.buf = this.file.getData().getContent(); } System.arraycopy(b, off, this.buf, filePointer, len); this.filePointer += len; }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { final RamFileData data = this.file.getData(); final int size = data.size(); final int newSize = size + len; // Store the Exception in order to notify the client again on close() try { this.file.resize(newSize); } catch (final IOException e) { this.exception = e; throw e; } System.arraycopy(b, off, data.getContent(), size, len); }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { if (this.getLeftBytes() < len) { final int newSize = this.buf.length + len - this.getLeftBytes(); this.file.resize(newSize); this.buf = this.file.getData().getContent(); } System.arraycopy(b, off, this.buf, filePointer, len); this.filePointer += len; }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { if (this.getLeftBytes() < len) { final int newSize = this.buf.length + len - this.getLeftBytes(); this.file.resize(newSize); this.buf = this.file.getData().getContent(); } System.arraycopy(b, off, this.buf, filePointer, len); this.filePointer += len; }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { if (this.getLeftBytes() < len) { final int newSize = this.buf.length + len - this.getLeftBytes(); this.file.resize(newSize); this.buf = this.file.getData().getContent(); } System.arraycopy(b, off, this.buf, filePointer, len); this.filePointer += len; }