|
|
@ -79,7 +79,15 @@ public class BlobBasedConfig extends Config { |
|
|
|
public BlobBasedConfig(Config base, final byte[] blob) |
|
|
|
public BlobBasedConfig(Config base, final byte[] blob) |
|
|
|
throws ConfigInvalidException { |
|
|
|
throws ConfigInvalidException { |
|
|
|
super(base); |
|
|
|
super(base); |
|
|
|
fromText(RawParseUtils.decode(blob)); |
|
|
|
final String decoded; |
|
|
|
|
|
|
|
if (blob.length >= 3 && blob[0] == (byte) 0xEF |
|
|
|
|
|
|
|
&& blob[1] == (byte) 0xBB && blob[2] == (byte) 0xBF) { |
|
|
|
|
|
|
|
decoded = RawParseUtils.decode(RawParseUtils.UTF8_CHARSET, |
|
|
|
|
|
|
|
blob, 3, blob.length); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
decoded = RawParseUtils.decode(blob); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
fromText(decoded); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|