Class ThrottledInputStream.Builder

All Implemented Interfaces:
IOSupplier<ThrottledInputStream>
Enclosing class:
ThrottledInputStream

Builds a new ThrottledInputStream.

Using NIO Link icon


 ThrottledInputStream in = ThrottledInputStream.builder()
   .setPath(Paths.get("MyFile.xml"))
   .setMaxBytes(100_000, ChronoUnit.SECONDS)
   .get();
 
 

Using IO Link icon


 ThrottledInputStream in = ThrottledInputStream.builder()
   .setFile(new File("MyFile.xml"))
   .setMaxBytes(100_000, ChronoUnit.SECONDS)
   .get();
 
 

 ThrottledInputStream in = ThrottledInputStream.builder()
   .setInputStream(inputStream)
   .setMaxBytes(100_000, ChronoUnit.SECONDS)
   .get();
 
 
See Also: