Java 8 NoSuchFileException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 NoSuchFileException class.

This code example shows how to use the following methods:
 
    public PathContentProvider(String contentType, Path filePath, int bufferSize) throws IOException
    { 
        super(contentType);
        if (!Files.isRegularFile(filePath))
            throw new NoSuchFileException(filePath.toString());
        if (!Files.isReadable(filePath))
            throw new AccessDeniedException(filePath.toString());
        this.filePath = filePath;
        this.fileSize = Files.size(filePath);
        this.bufferSize = bufferSize;
    } 
 
    @Override 
    public long getLength() 
    { 
        return fileSize;
    } 
 
    @Override 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
    public PathContentProvider(String contentType, Path filePath, int bufferSize) throws IOException
    { 
        super(contentType);
        if (!Files.isRegularFile(filePath))
            throw new NoSuchFileException(filePath.toString());
        if (!Files.isReadable(filePath))
            throw new AccessDeniedException(filePath.toString());
        this.filePath = filePath;
        this.fileSize = Files.size(filePath);
        this.bufferSize = bufferSize;
    } 
 
    @Override 
    public long getLength() 
    { 
        return fileSize;
    } 
 
    public ByteBufferPool getByteBufferPool() 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
   * @return this 
   * @throws NoSuchFileException if this entry does not exist 
   */ 
  public DirectoryEntry requireExists(Path pathForException) throws NoSuchFileException {
    if (!exists()) { 
      throw new NoSuchFileException(pathForException.toString());
    } 
    return this;
  } 
 
  /** 
   * Checks that this entry does not exist, throwing an exception if it does. 
   * 
   * @return this 
   * @throws FileAlreadyExistsException if this entry does not exist 
   */ 
  public DirectoryEntry requireDoesNotExist( 
      Path pathForException) throws FileAlreadyExistsException {
    if (exists()) { 
      throw new FileAlreadyExistsException(pathForException.toString());
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 NoSuchFileException Methods: