com.perforce.p4java
Interface ILookahead
public interface ILookahead
Interface for use by CharsetConverter
to query for more bytes to
convert based on the last character decoded. This is most commonly used for
line ending lookahead when \r\n needs to be converted to \n. The lookahead in
that case would get the next x bytes where x is the number of bytes wide the
\n character is when the \r character is specified as the last decoded
character.
Method Summary |
byte[] |
bytesToAdd(char lastDecodedChar)
Get an array of bytes to add based on the last decoded character found. |
bytesToAdd
byte[] bytesToAdd(char lastDecodedChar)
- Get an array of bytes to add based on the last decoded character found.
The array of bytes returned represent "looking ahead" to see if more
characters should be converted.
- Parameters:
lastDecodedChar
-
- Returns:
- - array of bytes or null if lookahead is not needed
Copyright © 2015 Perforce Software. All Rights Reserved.