Site hosted by Angelfire.com: Build your free website today!

[Back to pkda2001-java HOME page]  [Source CODE pages]  -[^^pizoig (pkda2001) HOME page]

PKDA2001: Java: Apps - Text and Discussions

- On this page: {} {} {} {} {MyFileCopier} {} {} {} {}


MyFileCopier

Current versions: 001, 002, 002b, 003, 004 MyFileCopier makes an ascii copy of a file to a .out file Two problems: If the file contains BINARY info (eg, .JPG or .DOC files, etc) then it corrupts the file (and will be shorter!) If the file is created without a terminating <cr> <lf> ( 0x0A, 0x0D ) then the new file will be longer by TWO bytes -- ie, since it does a ReadLine/WriteLine it always writes DOS format. Have to try re-compiling under unix... hmmmmm :?

MyFileCopier002

Next the idea is to NUMBER the lines in a file (ie, so that they can be referenced in class discussions, foot-notes, etc). -[
MyFilecopier002]- Also, see: -[MyFilecopier002(b)]- (i was having probs with string compare, toUpperCase(), etc)

MyFileCopier003

Next the idea is to Dek-foliate a file. Each line is indented 5 spaces, and the text is limited to about 40 chars. (Refered to as Duchamp-Esrey-Clark form, or "Dek-foliation"; as in Deklein Hawks) A "folio edition" is one that is folded in half (usually side to side, but often top down); refer to "Shakespear folio editions". This version does NOT generate extra NEW LINES when they are encountered. A bit aesthetically limited, me thinks... (see version 004) NOTE: Dek-Foliation is DESTRUCTIVE to structured files like HTML or SOURCE CODE files!!! -[MyFilecopier003]-

MyFileCopier004

Like 003, above this creates a Dek-foliated file. This version DOES generate extra NEW LINES when they are encountered. Seems to be "the one" to use!!! NOTE: Dek-Foliation is DESTRUCTIVE to structured files like HTML or SOURCE CODE files!!! -[MyFilecopier004]- {Back to the TOP of this file}