我需要读取 .bib 文件并将其标签插入到 bib-entries 的对象中
文件很大(几乎 4000 行),所以我的第一个问题是使用什么(bufferedReader 和 FileReader)
一般格式是
@ARTICLE{orleans01DJ,
author = {Doug Orleans and Karl Lieberherr},
title = {{{DJ}: {Dynamic} Adaptive Programming in {Java}}},
journal = {Metalevel Architectures and Separation of Crosscutting Concerns 3rd
Int'l Conf. (Reflection 2001), {LNCS} 2192},
year = {2001},
pages = {73--80},
month = sep,
editor = {A. Yonezawa and S. Matsuoka},
owner = {Administrator},
publisher = {Springer-Verlag},
timestamp = {2009.03.09}
}
@ARTICLE{Ossher:1995:SOCR,
author = {Harold Ossher and Matthew Kaplan and William Harrison and Alexander
Katz},
title = {{Subject-Oriented Composition Rules}},
journal = {ACM SIG{\-}PLAN Notices},
year = {1995},
volume = {30},
pages = {235--250},
number = {10},
month = oct,
acknowledgement = {Nelson H. F. Beebe, University of Utah, Department of Mathematics,
110 LCB, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA,
Tel: +1 801 581 5254, FAX: +1 801 581 4148, e-mail: \path|[email protected] /cdn-cgi/l/email-protection|,
\path|[email protected] /cdn-cgi/l/email-protection|, \path|beeb[email protected] /cdn-cgi/l/email-protection| (Internet), URL:
\path|http://www.math.utah.edu/~beebe/|},
bibdate = {Fri Apr 30 12:33:10 MDT 1999},
coden = {SINODQ},
issn = {0362-1340},
keywords = {ACM; object-oriented programming systems; OOPSLA; programming languages;
SIGPLAN},
owner = {Administrator},
timestamp = {2009.02.26}
}
正如您所看到的,有些条目超过了行,以 } 结尾的条目
以 } 或 }} 结尾的条目,
另外,有些条目中间有 {..},{..}..
所以,我对如何开始阅读这个文件以及如何获取这些条目并操作它们有点困惑。
任何帮助将不胜感激。