-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gabriel Llamas
committed
Aug 31, 2013
1 parent
3a565fd
commit f47c604
Showing
5 changed files
with
330 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var reader = require ("./lib"); | ||
var hex = require ("hex"); | ||
|
||
/* | ||
var br = reader.open (__filename); | ||
br.on ("error", function (error){ | ||
console.error (error); | ||
}) | ||
.on ("close", function (){ | ||
console.log ("closed"); | ||
}) | ||
.read (10, function (bytesRead, buffer){ | ||
console.log (bytesRead, buffer.toString ()); | ||
}) | ||
.seek (-1, { current: true }, function (){ | ||
console.log ("p: " + br.tell ()); | ||
}) | ||
.read (20, function (bytesRead, buffer){ | ||
console.log (bytesRead, buffer.toString ()); | ||
}) | ||
.close (); | ||
*/ | ||
|
||
/* | ||
var br = reader.open ("s"); | ||
br.on ("error", function (error){ | ||
console.error (error); | ||
}) | ||
.on ("close", function (){ | ||
console.log ("closed"); | ||
}) | ||
.seek (21, function (){ | ||
console.log ("p: " + br.tell ()); | ||
}) | ||
.read (5, function (bytesRead, buffer){ | ||
console.log (bytesRead, buffer); | ||
}) | ||
*/ | ||
|
||
|
||
var br = reader.open ("test/file", { highWaterMark: 3 }); | ||
|
||
br.on ("error", function (error){ | ||
console.error (error); | ||
}) | ||
.on ("close", function (){ | ||
console.log ("closed"); | ||
}) | ||
.read (5, function (bytesRead, buffer){ | ||
console.log (bytesRead, buffer); | ||
}) |
Oops, something went wrong.