private Charset guessEncoding() { try { return RawParseUtils.parseEncoding(buffer); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { return UTF_8; } }
/** * Determine the encoding of the commit message buffer. * <p> * Locates the "encoding" header (if present) and then returns the proper * character set to apply to this buffer to evaluate its contents as * character data. * <p> * If no encoding header is present {@code UTF-8} is assumed. * * @return the preferred encoding of {@link #getRawBuffer()}. * @throws IllegalCharsetNameException * if the character set requested by the encoding header is * malformed and unsupportable. * @throws UnsupportedCharsetException * if the JRE does not support the character set requested by * the encoding header. */ public final Charset getEncoding() { return RawParseUtils.parseEncoding(buffer); }
private Charset guessEncoding() { try { return RawParseUtils.parseEncoding(buffer); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { return UTF_8; } }
private Charset guessEncoding() { try { return RawParseUtils.parseEncoding(buffer); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { return UTF_8; } }
private Charset guessEncoding() { try { return RawParseUtils.parseEncoding(buffer); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { return UTF_8; } }
/** * Determine the encoding of the commit message buffer. * <p> * Locates the "encoding" header (if present) and then returns the proper * character set to apply to this buffer to evaluate its contents as * character data. * <p> * If no encoding header is present {@code UTF-8} is assumed. * * @return the preferred encoding of {@link #getRawBuffer()}. * @throws IllegalCharsetNameException * if the character set requested by the encoding header is * malformed and unsupportable. * @throws UnsupportedCharsetException * if the JRE does not support the character set requested by * the encoding header. */ public final Charset getEncoding() { return RawParseUtils.parseEncoding(buffer); }
/** * Determine the encoding of the commit message buffer. * <p> * Locates the "encoding" header (if present) and then returns the proper * character set to apply to this buffer to evaluate its contents as * character data. * <p> * If no encoding header is present {@code UTF-8} is assumed. * * @return the preferred encoding of {@link #getRawBuffer()}. * @throws IllegalCharsetNameException * if the character set requested by the encoding header is * malformed and unsupportable. * @throws UnsupportedCharsetException * if the JRE does not support the character set requested by * the encoding header. */ public final Charset getEncoding() { return RawParseUtils.parseEncoding(buffer); }
/** * Determine the encoding of the commit message buffer. * <p> * Locates the "encoding" header (if present) and then returns the proper * character set to apply to this buffer to evaluate its contents as * character data. * <p> * If no encoding header is present {@code UTF-8} is assumed. * * @return the preferred encoding of {@link #getRawBuffer()}. * @throws IllegalCharsetNameException * if the character set requested by the encoding header is * malformed and unsupportable. * @throws UnsupportedCharsetException * if the JRE does not support the character set requested by * the encoding header. */ public final Charset getEncoding() { return RawParseUtils.parseEncoding(buffer); }
Charset cs; try { cs = parseEncoding(raw); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {
Charset cs; try { cs = parseEncoding(raw); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {
Charset cs; try { cs = parseEncoding(raw); } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {