Class Screenshot.FileByteSource

  • Enclosing interface:
    Screenshot

    public static class Screenshot.FileByteSource
    extends com.google.common.io.ByteSource
    • Field Detail

      • file

        public final File file
    • Constructor Detail

      • FileByteSource

        public FileByteSource​(File file)
      • FileByteSource

        protected FileByteSource​(File file,
                                 com.google.common.io.ByteSource delegate)
    • Method Detail

      • asCharSource

        public com.google.common.io.CharSource asCharSource​(Charset charset)
        Overrides:
        asCharSource in class com.google.common.io.ByteSource
      • openBufferedStream

        public InputStream openBufferedStream()
                                       throws IOException
        Overrides:
        openBufferedStream in class com.google.common.io.ByteSource
        Throws:
        IOException
      • slice

        public com.google.common.io.ByteSource slice​(long offset,
                                                     long length)
        Overrides:
        slice in class com.google.common.io.ByteSource
      • isEmpty

        public boolean isEmpty()
                        throws IOException
        Overrides:
        isEmpty in class com.google.common.io.ByteSource
        Throws:
        IOException
      • sizeIfKnown

        @Beta
        public com.google.common.base.Optional<Long> sizeIfKnown()
        Overrides:
        sizeIfKnown in class com.google.common.io.ByteSource
      • size

        public long size()
                  throws IOException
        Overrides:
        size in class com.google.common.io.ByteSource
        Throws:
        IOException
      • copyTo

        public long copyTo​(com.google.common.io.ByteSink sink)
                    throws IOException
        Overrides:
        copyTo in class com.google.common.io.ByteSource
        Throws:
        IOException
      • read

        public byte[] read()
                    throws IOException
        Overrides:
        read in class com.google.common.io.ByteSource
        Throws:
        IOException
      • read

        @Beta
        public <T> T read​(com.google.common.io.ByteProcessor<T> processor)
                   throws IOException
        Overrides:
        read in class com.google.common.io.ByteSource
        Throws:
        IOException
      • hash

        public com.google.common.hash.HashCode hash​(com.google.common.hash.HashFunction hashFunction)
                                             throws IOException
        Overrides:
        hash in class com.google.common.io.ByteSource
        Throws:
        IOException
      • contentEquals

        public boolean contentEquals​(com.google.common.io.ByteSource other)
                              throws IOException
        Overrides:
        contentEquals in class com.google.common.io.ByteSource
        Throws:
        IOException