3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 18:25:51 +00:00

SPVBlockStore: Use Charset constant.

This commit is contained in:
Andreas Schildbach 2016-08-29 10:45:06 +02:00
parent ea7ea3b304
commit 93e5f7c57b

View File

@ -20,6 +20,8 @@ import org.bitcoinj.core.*;
import org.bitcoinj.utils.*;
import org.slf4j.*;
import com.google.common.base.Charsets;
import javax.annotation.*;
import java.io.*;
import java.nio.*;
@ -131,7 +133,7 @@ public class SPVBlockStore implements BlockStore {
if (exists) {
header = new byte[4];
buffer.get(header);
if (!new String(header, "US-ASCII").equals(HEADER_MAGIC))
if (!new String(header, Charsets.US_ASCII).equals(HEADER_MAGIC))
throw new BlockStoreException("Header bytes do not equal " + HEADER_MAGIC);
} else {
initNewStore(params);