throw new PipeException(); throw new PipeException();
throw runtime.newIOError("could not reopen: " + ex.getMessage()); } catch (PipeException ex) { ex.printStackTrace(); throw runtime.newIOError("could not reopen: " + ex.getMessage()); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError();
throw runtime.newIOError("could not reopen: " + ex.getMessage()); } catch (PipeException ex) { ex.printStackTrace(); throw runtime.newIOError("could not reopen: " + ex.getMessage()); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError();
throw new PipeException(); throw new PipeException();
/** * @throws IOException */ public synchronized long fgetpos() throws IOException, PipeException, InvalidValueException, BadDescriptorException { // Correct position for read / write buffering (we could invalidate, but expensive) if (descriptor.isSeekable()) { FileChannel fileChannel = (FileChannel)descriptor.getChannel(); long pos = fileChannel.position(); // Adjust for buffered data if (reading) { pos -= buffer.remaining(); return pos - (pos > 0 && hasUngotChars() ? ungotChars.length() : 0); } else { return pos + buffer.position(); } } else if (descriptor.isNull()) { return 0; } else { throw new PipeException(); } }
/** * @throws IOException */ public synchronized long fgetpos() throws IOException, PipeException, InvalidValueException, BadDescriptorException { // Correct position for read / write buffering (we could invalidate, but expensive) if (descriptor.isSeekable()) { FileChannel fileChannel = (FileChannel)descriptor.getChannel(); long pos = fileChannel.position(); // Adjust for buffered data if (reading) { pos -= buffer.remaining(); return pos - (pos > 0 && hasUngotChars() ? ungotChars.length() : 0); } else { return pos + buffer.position(); } } else if (descriptor.isNull()) { return 0; } else { throw new PipeException(); } }
throw new PipeException(); } else {
throw new PipeException(); } else {
/** * @throws IOException */ public synchronized long fgetpos() throws IOException, PipeException, InvalidValueException, BadDescriptorException { // Correct position for read / write buffering (we could invalidate, but expensive) if (descriptor.isSeekable()) { SeekableByteChannel fileChannel = (SeekableByteChannel) descriptor.getChannel(); long pos = fileChannel.position(); // Adjust for buffered data if (reading) { pos -= buffer.remaining(); return pos - (pos > 0 && hasUngotChars() ? ungotChars.length() : 0); } else { return pos + buffer.position(); } } else if (descriptor.isNull()) { return 0; } else { throw new PipeException(); } }
/** * @throws IOException */ public synchronized long fgetpos() throws IOException, PipeException, InvalidValueException, BadDescriptorException { // Correct position for read / write buffering (we could invalidate, but expensive) if (descriptor.isSeekable()) { SeekableByteChannel fileChannel = (SeekableByteChannel) descriptor.getChannel(); long pos = fileChannel.position(); // Adjust for buffered data if (reading) { pos -= buffer.remaining(); return pos - (pos > 0 && hasUngotChars() ? ungotChars.length() : 0); } else { return pos + buffer.position(); } } else if (descriptor.isNull()) { return 0; } else { throw new PipeException(); } }
throw new PipeException(); throw new PipeException();
throw new PipeException(); throw new PipeException();
throw new PipeException(); } else {
throw new PipeException(); } else {