开发者

Java Scanner by page

开发者 https://www.devze.com 2023-02-21 20:12 出处:网络
I have a general question: is it possible in Java to r开发者_JAVA技巧ead in a document e.g. by using a Scanner object and to locate/identify the page in which a word occurs?

I have a general question: is it possible in Java to r开发者_JAVA技巧ead in a document e.g. by using a Scanner object and to locate/identify the page in which a word occurs?

maybe something similar to next(), hasNextLine()

[EDIT]

document = Word document


What sort of document are you trying to read? Simple text files (which is what Scanner is designed for) don't generally have the concept of pages. You can't use Scanner for things like PDF and Word documents.

0

精彩评论

暂无评论...
验证码 换一张
取 消