Package org.omegat.util
Class MagicComment
java.lang.Object
org.omegat.util.MagicComment
Utility for parsing "magic comments": a leading line in a file that contains
metadata or settings like
# -*- coding: utf-8; mode: java; tab-width: 4 -*-
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MagicComment
public MagicComment()
-
-
Method Details
-
parse
Extract the first line of the file and parse with#parse(String)- Parameters:
file- target file.- Returns:
- Map with magic comment database.
- Throws:
IOException- when I/O error happened.
-
parse
Parse magic comment- Parameters:
str- input string.- Returns:
- Key-Value map of String.
-