Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Example.

  • Loading branch information...
commit 5802e514dc5ad748e58e2eb8fa18c949fcec1496 1 parent 14e1e8a
@headius authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 examples/simple.rb
View
9 examples/simple.rb
@@ -0,0 +1,9 @@
+require 'jpager'
+
+JPager.page do |input|
+ # input is a Java OutputStream, so we need to give it raw bytes
+ 1_000_000.times do |i|
+ input.write(i.to_s.to_java_bytes)
+ input.write("\n".to_java_bytes)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.