01: /*
02: * @(#)CollectionLineHandler.java 1.2 04/12/06
03: *
04: * Copyright (c) 2002-2004 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package org.pnuts.text;
10:
11: import java.util.*;
12:
13: class CollectionLineHandler implements LineHandler {
14: Collection col;
15:
16: CollectionLineHandler(Collection col) {
17: this .col = col;
18: }
19:
20: public void process(char[] c, int offset, int length) {
21: col.add(new String(c, offset, length));
22: }
23: }
|