⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logreader.html

📁 用JAVA编写的,在做实验的时候留下来的,本来想删的,但是传上来,大家分享吧
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</DD></DL><HR><A NAME="buildDisplayingHeader(int, long)"><!-- --></A><H3>buildDisplayingHeader</H3><PRE>public static java.lang.String <B>buildDisplayingHeader</B>(int&nbsp;len,                                                     long&nbsp;logsize)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="get(java.io.InputStreamReader, int, int, long)"><!-- --></A><H3>get</H3><PRE>public static java.lang.String[] <B>get</B>(java.io.InputStreamReader&nbsp;reader,                                     int&nbsp;lineNumber,                                     int&nbsp;n,                                     long&nbsp;logsize)</PRE><DL><DD>Gets a portion of a log file. Starting at a given line number and the n-1 lines following that one or until the end of the log if that is reached first.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - source to scan for lines<DD><CODE>lineNumber</CODE> - The number of the first line to get (if larger then the                   file an empty string will be returned)<DD><CODE>n</CODE> - How many lines to return (total, including the one indicated by                   lineNumber). If smaller then 1 then an empty string                   will be returned.<DD><CODE>logsize</CODE> - total size of source<DT><B>Returns:</B><DD>An array of two strings is returned. At index 0 a portion of the         file starting at lineNumber and reaching lineNumber+n is located.         At index 1 there is an informational string about how large a         segment of the file is being returned.         Null is returned if errors occur (file not found or io exception)</DL></DD></DL><HR><A NAME="findFirstLineContaining(java.lang.String, java.lang.String)"><!-- --></A><H3>findFirstLineContaining</H3><PRE>public static int <B>findFirstLineContaining</B>(java.lang.String&nbsp;aFileName,                                          java.lang.String&nbsp;regExpr)</PRE><DL><DD>Return the line number of the first line in the log/file that matches a given regular expression.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aFileName</CODE> - The filename of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DT><B>Returns:</B><DD>The line number (counting from 1, not zero) of the first line         that matches the given regular expression. -1 is returned if no         line matches the regular expression. -1 also is returned if          errors occur (file not found, io exception etc.)</DL></DD></DL><HR><A NAME="findFirstLineBeginningFromSeries(java.lang.String, java.lang.String)"><!-- --></A><H3>findFirstLineBeginningFromSeries</H3><PRE>public static int <B>findFirstLineBeginningFromSeries</B>(java.lang.String&nbsp;aFileName,                                                   java.lang.String&nbsp;prefix)</PRE><DL><DD>Return the line number of the first line in the log/file that begins with the given string.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aFileName</CODE> - The filename of the log/file<DD><CODE>prefix</CODE> - The prefix string to match<DT><B>Returns:</B><DD>The line number (counting from 1, not zero) of the first line         that matches the given regular expression. -1 is returned if no         line matches the regular expression. -1 also is returned if          errors occur (file not found, io exception etc.)</DL></DD></DL><HR><A NAME="findFirstLineBeginning(java.io.InputStreamReader, java.lang.String)"><!-- --></A><H3>findFirstLineBeginning</H3><PRE>public static int <B>findFirstLineBeginning</B>(java.io.InputStreamReader&nbsp;reader,                                         java.lang.String&nbsp;prefix)</PRE><DL><DD>Return the line number of the first line in the log/file that that begins with the given string.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - The reader of the log/file<DD><CODE>prefix</CODE> - The prefix string to match<DT><B>Returns:</B><DD>The line number (counting from 1, not zero) of the first line         that matches the given regular expression. -1 is returned if no         line matches the regular expression. -1 also is returned if          errors occur (file not found, io exception etc.)</DL></DD></DL><HR><A NAME="findFirstLineContainingFromSeries(java.lang.String, java.lang.String)"><!-- --></A><H3>findFirstLineContainingFromSeries</H3><PRE>public static int <B>findFirstLineContainingFromSeries</B>(java.lang.String&nbsp;aFileName,                                                    java.lang.String&nbsp;regExpr)</PRE><DL><DD>Return the line number of the first line in the log/file that matches a given regular expression.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aFileName</CODE> - The filename of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DT><B>Returns:</B><DD>The line number (counting from 1, not zero) of the first line         that matches the given regular expression. -1 is returned if no         line matches the regular expression. -1 also is returned if          errors occur (file not found, io exception etc.)</DL></DD></DL><HR><A NAME="findFirstLineContaining(java.io.InputStreamReader, java.lang.String)"><!-- --></A><H3>findFirstLineContaining</H3><PRE>public static int <B>findFirstLineContaining</B>(java.io.InputStreamReader&nbsp;reader,                                          java.lang.String&nbsp;regExpr)</PRE><DL><DD>Return the line number of the first line in the log/file that matches a given regular expression.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - The reader of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DT><B>Returns:</B><DD>The line number (counting from 1, not zero) of the first line         that matches the given regular expression. -1 is returned if no         line matches the regular expression. -1 also is returned if          errors occur (file not found, io exception etc.)</DL></DD></DL><HR><A NAME="getByRegExpr(java.lang.String, java.lang.String, int, boolean, int, int)"><!-- --></A><H3>getByRegExpr</H3><PRE>public static java.lang.String[] <B>getByRegExpr</B>(java.lang.String&nbsp;aFileName,                                              java.lang.String&nbsp;regExpr,                                              int&nbsp;addLines,                                              boolean&nbsp;prependLineNumbers,                                              int&nbsp;skipFirstMatches,                                              int&nbsp;numberOfMatches)</PRE><DL><DD>Returns all lines in a log/file matching a given regular expression.   Possible to get lines immediately following the matched line.  Also  possible to have each line prepended by it's line number.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aFileName</CODE> - The filename of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DD><CODE>addLines</CODE> - How many lines (in addition to the matched line) to add.                  A value less then 1 will mean that only the matched line                  will be included. If another matched line is hit before                  we reach this limit it will be included and this counter                 effectively reset for it.<DD><CODE>prependLineNumbers</CODE> - If true, then each line will be prepended by                            it's line number in the file.<DD><CODE>skipFirstMatches</CODE> - The first number of matches up to this value will                         be skipped over.<DD><CODE>numberOfMatches</CODE> - Once past matches that are to be skipped this many                        matches will be added to the return value. A                        value of 0 will cause all matching lines to be                        included.<DT><B>Returns:</B><DD>An array of two strings is returned. At index 0 tall lines in a         log/file matching a given regular expression is located.         At index 1 there is an informational string about how large a         segment of the file is being returned.         Null is returned if errors occur (file not found or io exception)         If a PatternSyntaxException occurs, it's error message will be         returned and the informational string will be empty (not null).</DL></DD></DL><HR><A NAME="getByRegExprFromSeries(java.lang.String, java.lang.String, int, boolean, int, int)"><!-- --></A><H3>getByRegExprFromSeries</H3><PRE>public static java.lang.String[] <B>getByRegExprFromSeries</B>(java.lang.String&nbsp;aFileName,                                                        java.lang.String&nbsp;regExpr,                                                        int&nbsp;addLines,                                                        boolean&nbsp;prependLineNumbers,                                                        int&nbsp;skipFirstMatches,                                                        int&nbsp;numberOfMatches)</PRE><DL><DD>Returns all lines in a log/file matching a given regular expression.   Possible to get lines immediately following the matched line.  Also  possible to have each line prepended by it's line number.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>aFileName</CODE> - The filename of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DD><CODE>addLines</CODE> - How many lines (in addition to the matched line) to add.                  A value less then 1 will mean that only the matched line                  will be included. If another matched line is hit before                  we reach this limit it will be included and this counter                 effectively reset for it.<DD><CODE>prependLineNumbers</CODE> - If true, then each line will be prepended by                            it's line number in the file.<DD><CODE>skipFirstMatches</CODE> - The first number of matches up to this value will                         be skipped over.<DD><CODE>numberOfMatches</CODE> - Once past matches that are to be skipped this many                        matches will be added to the return value. A                        value of 0 will cause all matching lines to be                        included.<DT><B>Returns:</B><DD>An array of two strings is returned. At index 0 tall lines in a         log/file matching a given regular expression is located.         At index 1 there is an informational string about how large a         segment of the file is being returned.         Null is returned if errors occur (file not found or io exception)         If a PatternSyntaxException occurs, it's error message will be         returned and the informational string will be empty (not null).</DL></DD></DL><HR><A NAME="getByRegExpr(java.io.InputStreamReader, java.lang.String, int, boolean, int, int, long)"><!-- --></A><H3>getByRegExpr</H3><PRE>public static java.lang.String[] <B>getByRegExpr</B>(java.io.InputStreamReader&nbsp;reader,                                              java.lang.String&nbsp;regExpr,                                              int&nbsp;addLines,                                              boolean&nbsp;prependLineNumbers,                                              int&nbsp;skipFirstMatches,                                              int&nbsp;numberOfMatches,                                              long&nbsp;logsize)</PRE><DL><DD>Returns all lines in a log/file matching a given regular expression.   Possible to get lines immediately following the matched line.  Also  possible to have each line prepended by it's line number.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - The reader of the log/file<DD><CODE>regExpr</CODE> - The regular expression that is to be used<DD><CODE>addLines</CODE> - How many lines (in addition to the matched line) to add.                  A value less then 1 will mean that only the matched line                  will be included. If another matched line is hit before                  we reach this limit it will be included and this counter                 effectively reset for it.<DD><CODE>prependLineNumbers</CODE> - If true, then each line will be prepended by                            it's line number in the file.<DD><CODE>skipFirstMatches</CODE> - The first number of matches up to this value will                         be skipped over.<DD><CODE>numberOfMatches</CODE> - Once past matches that are to be skipped this many                        matches will be added to the return value. A                        value of 0 will cause all matching lines to be

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -