Permalink
Browse files

Example.

  • Loading branch information...
1 parent 14e1e8a commit 5802e514dc5ad748e58e2eb8fa18c949fcec1496 @headius committed Apr 28, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 examples/simple.rb
View
@@ -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

0 comments on commit 5802e51

Please sign in to comment.