Class ThrottledInputStream.Builder

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

Builds a new ThrottledInputStream.

Using NIO


 ThrottledInputStream in = ThrottledInputStream.builder()
   .setPath(Paths.get("MyFile.xml"))
   .setMaxBytesPerSecond(100_000)
   .get();
 
 

Using IO


 ThrottledInputStream in = ThrottledInputStream.builder()
   .setFile(new File("MyFile.xml"))
   .setMaxBytesPerSecond(100_000)
   .get();
 
 

 ThrottledInputStream in = ThrottledInputStream.builder()
   .setInputStream(inputStream)
   .setMaxBytesPerSecond(100_000)
   .get();
 
 
See Also: