|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
com.mucommander.io.RandomAccessOutputStream
com.mucommander.file.impl.smb.SMBFile.SMBRandomAccessOutputStream
public static class SMBFile.SMBRandomAccessOutputStream
SMBRandomAccessOutputStream extends RandomAccessOutputStream to provide random write access to an SMBFile.
| Constructor Summary | |
|---|---|
SMBFile.SMBRandomAccessOutputStream(jcifs.smb.SmbRandomAccessFile raf)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes this stream and releases any system resources associated with the stream. |
long |
getLength()
Returns the length of the file, in bytes. |
long |
getOffset()
Returns the offset (in bytes) from the beginning of the file at which the next read or write occurs. |
void |
seek(long offset)
Sets the offset, measured from the beginning of the file, at which the next read or write occurs. |
void |
setLength(long newLength)
Sets the length of the file. |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this file, starting at the current file offset. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this file. |
void |
write(int i)
|
| Methods inherited from class java.io.OutputStream |
|---|
flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SMBFile.SMBRandomAccessOutputStream(jcifs.smb.SmbRandomAccessFile raf)
| Method Detail |
|---|
public void write(int i)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public void write(byte[] b)
throws java.io.IOException
RandomAccessOutputStreamb.length bytes from the specified byte array to this file, starting at the current file offset.
write in class RandomAccessOutputStreamb - the data to write
java.io.IOException - if an I/O error occurs
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
RandomAccessOutputStreamlen bytes from the specified byte array starting at offset off to this file.
write in class RandomAccessOutputStreamb - the data to writeoff - the start offset in the data arraylen - the number of bytes to write
java.io.IOException - if an I/O error occurs
public void close()
throws java.io.IOException
RandomAccessOutputStream
close in interface RandomAccessclose in interface java.io.Closeableclose in class RandomAccessOutputStreamjava.io.IOException - if an I/O error occurs.
public long getOffset()
throws java.io.IOException
RandomAccess
java.io.IOException - if an I/O error occurs.
public long getLength()
throws java.io.IOException
RandomAccess
java.io.IOException - if an I/O error occurs
public void seek(long offset)
throws java.io.IOException
RandomAccess
offset - the new offset position, measured in bytes from the beginning of the file
java.io.IOException - if an I/O error occurs
public void setLength(long newLength)
throws java.io.IOException
RandomAccessOutputStreamIf the present length of the file as returned by the RandomAccess.getLength() method is greater than the
newLength argument then the file will be truncated. In this case, if the file offset as returned
by the RandomAccess.getOffset() method is greater than newLength then the
offset will be equal to newLength after this method returns .
If the present length of the file as returned by the RandomAccess.getLength() method is smaller than the
newLength argument then the file will be extended. In this case, the contents of the extended
portion of the file are not defined.
setLength in class RandomAccessOutputStreamnewLength - the new file's length
java.io.IOException - If an I/O error occurred while trying to change the file's length
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard