/** * Returns an input stream for reading the content. * * @return The InputStream * @throws FileSystemException if an error occurs. */ @Override public InputStream getInputStream() throws FileSystemException { /* * if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw * new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the raw input stream final InputStream inputStream = fileObject.getInputStream(); final InputStream wrappedInputStream = new FileContentInputStream(fileObject, inputStream); getOrCreateThreadData().addInstr(wrappedInputStream); streamOpened(); return wrappedInputStream; }
/** * Returns an input/output stream to use to read and write the content of the file in an random manner. * * @param mode The RandomAccessMode. * @return A RandomAccessContent object to access the file. * @throws FileSystemException if an error occurs. */ @Override public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) { throw new * FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content final RandomAccessContent rastr = fileObject.getRandomAccessContent(mode); final FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr); getOrCreateThreadData().addRastr(rac); streamOpened(); return rac; }
/** * Returns an input stream for reading the content. * * @return The InputStream * @throws FileSystemException if an error occurs. */ @Override public InputStream getInputStream() throws FileSystemException { /* * if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw * new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the raw input stream final InputStream inputStream = fileObject.getInputStream(); final InputStream wrappedInputStream = new FileContentInputStream(fileObject, inputStream); getOrCreateThreadData().addInstr(wrappedInputStream); streamOpened(); return wrappedInputStream; }
/** * Returns an input stream for reading the content. * * @return The InputStream * @throws FileSystemException if an error occurs. */ @Override public InputStream getInputStream() throws FileSystemException { /* * if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw * new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the raw input stream final InputStream inputStream = fileObject.getInputStream(); final InputStream wrappedInputStream = new FileContentInputStream(fileObject, inputStream); getOrCreateThreadData().addInstr(wrappedInputStream); streamOpened(); return wrappedInputStream; }
/** * Returns an input/output stream to use to read and write the content of the file in an random manner. * * @param mode The RandomAccessMode. * @return A RandomAccessContent object to access the file. * @throws FileSystemException if an error occurs. */ @Override public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) { throw new * FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content final RandomAccessContent rastr = fileObject.getRandomAccessContent(mode); final FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr); getOrCreateThreadData().addRastr(rac); streamOpened(); return rac; }
/** * Returns an input/output stream to use to read and write the content of the file in an random manner. * * @param mode The RandomAccessMode. * @return A RandomAccessContent object to access the file. * @throws FileSystemException if an error occurs. */ @Override public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) { throw new * FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content final RandomAccessContent rastr = fileObject.getRandomAccessContent(mode); final FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr); getOrCreateThreadData().addRastr(rac); streamOpened(); return rac; }
/** * Returns an input stream for reading the content. * @return The InputStream * @throws FileSystemException if an error occurs. */ @Override public InputStream getInputStream() throws FileSystemException { /* if (getThreadData().getState() == STATE_WRITING || getThreadData().getState() == STATE_RANDOM_ACCESS) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the raw input stream final InputStream instr = fileObject.getInputStream(); final InputStream wrappedInstr = new FileContentInputStream(fileObject, instr); getOrCreateThreadData().addInstr(wrappedInstr); streamOpened(); return wrappedInstr; }
/** * Returns an input/output stream to use to read and write the content of the file in an * random manner. * @param mode The RandomAccessMode. * @return A RandomAccessContent object to access the file. * @throws FileSystemException if an error occurs. */ @Override public RandomAccessContent getRandomAccessContent(final RandomAccessMode mode) throws FileSystemException { /* if (getThreadData().getState() != STATE_NONE) { throw new FileSystemException("vfs.provider/read-in-use.error", file); } */ // Get the content final RandomAccessContent rastr = fileObject.getRandomAccessContent(mode); final FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr); getOrCreateThreadData().addRastr(rac); streamOpened(); return rac; }
/** * Returns an output stream for writing the content in append mode. * * @param bAppend true if the data written should be appended. * @return The OutputStream for the file. * @throws FileSystemException if an error occurs. */ @Override public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) */ final FileContentThreadData streams = getOrCreateThreadData(); if (streams.getOutstr() != null) { throw new FileSystemException("vfs.provider/write-in-use.error", fileObject); } // Get the raw output stream final OutputStream outstr = fileObject.getOutputStream(bAppend); // Create and set wrapper final FileContentOutputStream wrapped = new FileContentOutputStream(fileObject, outstr); streams.setOutstr(wrapped); streamOpened(); return wrapped; }
/** * Returns an output stream for writing the content in append mode. * * @param bAppend true if the data written should be appended. * @return The OutputStream for the file. * @throws FileSystemException if an error occurs. */ @Override public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) */ final FileContentThreadData streams = getOrCreateThreadData(); if (streams.getOutstr() != null) { throw new FileSystemException("vfs.provider/write-in-use.error", fileObject); } // Get the raw output stream final OutputStream outstr = fileObject.getOutputStream(bAppend); // Create and set wrapper final FileContentOutputStream wrapped = new FileContentOutputStream(fileObject, outstr); streams.setOutstr(wrapped); streamOpened(); return wrapped; }
/** * Returns an output stream for writing the content in append mode. * @param bAppend true if the data written should be appended. * @return The OutputStream for the file. * @throws FileSystemException if an error occurs. */ @Override public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException { /* if (getThreadData().getState() != STATE_NONE) */ FileContentThreadData streams = getOrCreateThreadData(); if (streams.getOutstr() != null) { throw new FileSystemException("vfs.provider/write-in-use.error", fileObject); } // Get the raw output stream final OutputStream outstr = fileObject.getOutputStream(bAppend); // Create and set wrapper FileContentOutputStream wrapped = new FileContentOutputStream(fileObject, outstr); streams.setOutstr(wrapped); streamOpened(); return wrapped; }
/** * Returns an output stream for writing the content in append mode. * * @param bAppend true if the data written should be appended. * @return The OutputStream for the file. * @throws FileSystemException if an error occurs. */ @Override public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException { /* * if (getThreadData().getState() != STATE_NONE) */ final FileContentThreadData streams = getOrCreateThreadData(); if (streams.getOutstr() != null) { throw new FileSystemException("vfs.provider/write-in-use.error", fileObject); } // Get the raw output stream final OutputStream outstr = fileObject.getOutputStream(bAppend); // Create and set wrapper final FileContentOutputStream wrapped = new FileContentOutputStream(fileObject, outstr); streams.setOutstr(wrapped); streamOpened(); return wrapped; }
FileSystemException caught = null; try { final FileContentThreadData fileContentThreadData = getOrCreateThreadData();
FileSystemException caught = null; try { final FileContentThreadData fileContentThreadData = getOrCreateThreadData();
try final FileContentThreadData streams = getOrCreateThreadData();
FileSystemException caught = null; try { final FileContentThreadData fileContentThreadData = getOrCreateThreadData();