source: proiecte/HadoopA51/src/java/ro/pub/cs/pp/a51hadoop/common/TextArrayWritable.java @ 166

Last change on this file since 166 was 166, checked in by (none), 14 years ago

HadoopA51: imported git repository from github

File size: 923 bytes
Line 
1package ro.pub.cs.pp.a51hadoop.common;
2
3import ro.pub.cs.pp.a51hadoop.config.Config;
4import java.io.IOException;
5import java.util.*;
6
7import org.apache.hadoop.fs.Path;
8import org.apache.hadoop.conf.*;
9import org.apache.hadoop.io.*;
10import org.apache.hadoop.mapred.*;
11import org.apache.hadoop.util.*;
12
13public class TextArrayWritable extends ArrayWritable
14{
15        public TextArrayWritable() 
16        { 
17                super(Text.class);
18        }
19
20        public TextArrayWritable(String[] s)
21        {
22                super(s);
23        }
24
25        public String toString()
26        {
27                Writable[] w = get();
28                StringBuffer buffer = new StringBuffer();
29                String space = " ";
30
31                for(int i = 0; i< w.length; i++)
32                {
33                        buffer.append(w[i].toString());
34                        buffer.append(space);
35                }
36                return buffer.toString();
37        }
38}
Note: See TracBrowser for help on using the repository browser.