summaryrefslogtreecommitdiffstats
path: root/parsers/DocumentName.java
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2012-06-23 22:44:40 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2012-06-23 22:44:40 +0530
commit8bcd7f58acd38f5d5e1731f89be4a10a79d0fdb7 (patch)
tree6c1d4dfc97d77230ecf95d4e0f8b4fe1cde5b739 /parsers/DocumentName.java
scruf is "bzr"ed now.
Diffstat (limited to 'parsers/DocumentName.java')
-rw-r--r--parsers/DocumentName.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/parsers/DocumentName.java b/parsers/DocumentName.java
new file mode 100644
index 0000000..d0360c1
--- /dev/null
+++ b/parsers/DocumentName.java
@@ -0,0 +1,18 @@
+package scruf.parsers;
+
+import java.io.*;
+import scruf.io.*;
+
+public class DocumentName implements Parser {
+ public String parse(String fileContent) {
+ BufferedReader read =
+ new BufferedReader(new StringReader(fileContent));
+ try {
+ PresentFile.name = read.readLine();
+ }catch(IOException e) {
+ System.err.println("Error reading string "+e);
+ }
+ fileContent = new NullIt().nullIt(fileContent,PresentFile.name);
+ return fileContent;
+ }
+} \ No newline at end of file