1 /*
2 * Copyright (C) 2005-2015 Schlichtherle IT Services.
3 * All rights reserved. Use is subject to license terms.
4 */
5 package net.java.truevfs.comp.zip;
6
7 import java.nio.charset.Charset;
8 import java.util.Objects;
9 import javax.annotation.concurrent.ThreadSafe;
10
11 /**
12 * Default implementation of {@link ZipCharsetParameters}.
13 *
14 * @author Christian Schlichtherle
15 */
16 @ThreadSafe
17 class DefaultZipCharsetParameters implements ZipCharsetParameters {
18
19 private final Charset charset;
20
21 DefaultZipCharsetParameters(final Charset charset) {
22 this.charset = Objects.requireNonNull(charset);
23 }
24
25 @Override
26 public Charset getCharset() {
27 return charset;
28 }
29 }