Codota Logo
Os.lseek
Code IndexAdd Codota to your IDE (free)

How to use
lseek
method
in
libcore.io.Os

Best Java code snippets using libcore.io.Os.lseek (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: robovm/robovm

public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException { return os.lseek(fd, offset, whence); }
public StructStat lstat(String path) throws ErrnoException { return os.lstat(path); }
origin: robovm/robovm

/**
 * Gets the current position within this file. All reads and
 * writes take place at the current file pointer position.
 *
 * @return the current offset in bytes from the beginning of the file.
 *
 * @throws IOException
 *             if an error occurs while getting the file pointer of this
 *             file.
 */
public long getFilePointer() throws IOException {
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: robovm/robovm

  @Override
  public long skip(long byteCount) throws IOException {
    if (byteCount < 0) {
      throw new IOException("byteCount < 0: " + byteCount);
    }
    try {
      // Try lseek(2). That returns the new offset, but we'll throw an
      // exception if it couldn't perform exactly the seek we asked for.
      Libcore.os.lseek(fd, byteCount, SEEK_CUR);
      return byteCount;
    } catch (ErrnoException errnoException) {
      if (errnoException.errno == ESPIPE) {
        // You can't seek on a pipe, so fall back to the superclass' implementation.
        return super.skip(byteCount);
      }
      throw errnoException.rethrowAsIOException();
    }
  }
}
origin: robovm/robovm

/**
 * Moves this file's file pointer to a new position, from where following
 * {@code read}, {@code write} or {@code skip} operations are done. The
 * position may be greater than the current length of the file, but the
 * file's length will only change if the moving of the pointer is followed
 * by a {@code write} operation.
 *
 * @param offset
 *            the new file pointer position.
 * @throws IOException
 *             if this file is closed, {@code pos < 0} or another I/O error
 *             occurs.
 */
public void seek(long offset) throws IOException {
  if (offset < 0) {
    throw new IOException("offset < 0: " + offset);
  }
  try {
    Libcore.os.lseek(fd, offset, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: robovm/robovm

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: robovm/robovm

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: ibinti/bugvm

public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException { return os.lseek(fd, offset, whence); }
public StructStat lstat(String path) throws ErrnoException { return os.lstat(path); }
origin: MobiVM/robovm

public long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException { return os.lseek(fd, offset, whence); }
public StructStat lstat(String path) throws ErrnoException { return os.lstat(path); }
origin: ibinti/bugvm

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: MobiVM/robovm

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: com.bugvm/bugvm-rt

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: com.mobidevelop.robovm/robovm-rt

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: com.gluonhq/robovm-rt

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: FlexoVM/flexovm

public FileChannel position(long newPosition) throws IOException {
  checkOpen();
  if (newPosition < 0) {
    throw new IllegalArgumentException("position: " + newPosition);
  }
  try {
    Libcore.os.lseek(fd, newPosition, SEEK_SET);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
  return this;
}
origin: ibinti/bugvm

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: MobiVM/robovm

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: com.bugvm/bugvm-rt

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: com.mobidevelop.robovm/robovm-rt

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: com.gluonhq/robovm-rt

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
origin: FlexoVM/flexovm

public long position() throws IOException {
  checkOpen();
  try {
    return Libcore.os.lseek(fd, 0L, SEEK_CUR);
  } catch (ErrnoException errnoException) {
    throw errnoException.rethrowAsIOException();
  }
}
libcore.ioOslseek

Popular methods of Os

  • accept
  • access
  • bind
  • chmod
  • chown
  • close
  • connect
  • dup
  • dup2
  • environ
  • execv
  • execve
  • execv,
  • execve,
  • fchmod,
  • fchown,
  • fcntlFlock,
  • fcntlLong,
  • fcntlVoid,
  • fdatasync,
  • fstat,
  • fstatvfs

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now