站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LineSeparatorConversion (Editor Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.lib/1 1.14.0 3

org.netbeans.editor
Class LineSeparatorConversion

java.lang.Object
  extended by org.netbeans.editor.LineSeparatorConversion

public class LineSeparatorConversion
extends Object

Converters handling the various line separators.


Nested Class Summary
static class LineSeparatorConversion.FromLineFeed
          Convert all the occurrences of '\n' in the given text to the requested line separator.
static class LineSeparatorConversion.InitialSeparatorReader
           
static class LineSeparatorConversion.ToLineFeed
          Convert all the occurrences of '\r' and '\r\n' in the text to '\n'.
 
Method Summary
static void convertFromLineFeed(String text, int offset, int length, String lineFeedReplace, StringBuffer output)
          Convert all the occurrences of '\n' in the given text to the requested line separator.
static String convertFromLineFeed(String text, String lineFeedReplace)
          Convert all the occurrences of '\n' in the given text to the requested line separator.
static String convertToLineFeed(String text)
          Convert all the occurrences of '\r' and '\r\n' in the text to '\n'.
static void convertToLineFeed(String text, int offset, int length, StringBuffer output)
          Convert all the occurrences of '\r' and '\r\n' in the text to '\n'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertToLineFeed

public static String convertToLineFeed(String text)
Convert all the occurrences of '\r' and '\r\n' in the text to '\n'.

Parameters:
text - text being converted
Returns:
converted text with '\n' instead of '\r' and '\r\n'.

convertToLineFeed

public static void convertToLineFeed(String text,
                                     int offset,
                                     int length,
                                     StringBuffer output)
Convert all the occurrences of '\r' and '\r\n' in the text to '\n'.

Parameters:
text - text being converted
offset - offset of the first character in the text to be converted.
length - number of characters to be converted.
output - output buffer to which the converted characters are added.

convertFromLineFeed

public static String convertFromLineFeed(String text,
                                         String lineFeedReplace)
Convert all the occurrences of '\n' in the given text to the requested line separator.

Parameters:
text - text being converted
lineFeedReplace - characters that replace the '\n' character in the converted text.
Returns:
converted text with replaced '\n' by characters from lineFeedReplace string

convertFromLineFeed

public static void convertFromLineFeed(String text,
                                       int offset,
                                       int length,
                                       String lineFeedReplace,
                                       StringBuffer output)
Convert all the occurrences of '\n' in the given text to the requested line separator.

Parameters:
text - text being converted
offset - offset of the first character in the text to be converted.
length - number of characters to be converted.
lineFeedReplace - characters that replace the '\n' character in the output
output - output buffer to which the converted characters are added.

org.netbeans.modules.editor.lib/1 1.14.0 3

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.