Tabnine Logo
ExtraFields.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
de.schlichtherle.truezip.zip.ExtraFields
constructor

Best Java code snippets using de.schlichtherle.truezip.zip.ExtraFields.<init> (Showing top 6 results out of 315)

origin: stackoverflow.com

 public class Wrapper<T>  // Don't use this name either...
{
  private ExtraFields extraFields;
  private T myClass;

  public Wrapper(T myClass) {
    this.myClass = myClass;
    this.extraFields = new ExtraFields();
  }
}
origin: de.schlichtherle.truezip/truezip-driver-zip

final @Nullable ExtraField addExtraField(final ExtraField field) {
  assert null != field;
  ExtraFields fields = this.fields;
  if (null == fields)
    this.fields = fields = new ExtraFields();
  return fields.add(field);
}
origin: stackoverflow.com

 public class Subclass1 extends Superclass1
{
  private ExtraFields extraFields;

  public MySubclass()
  {
    super();
    extraFields = new ExtraFields();
  }

  public void doSomethingWithExtraFields()
  {
    extraFields.doSomethingWithExtraFields();
  }
}
origin: de.schlichtherle.truezip/truezip-driver-zip

/**
 * @throws IllegalArgumentException if the serialized extra fields do not
 *         conform to the ZIP File Format Specification.
 */
private void setExtraFields(final byte[] buf, final boolean zip64)
throws IllegalArgumentException {
  assert UShort.check(buf.length);
  if (0 < buf.length) {
    final ExtraFields fields = new ExtraFields();
    try {
      fields.readFrom(buf, 0, buf.length);
      if (zip64) parseZip64ExtraField(fields);
    } catch (final IndexOutOfBoundsException ex) {
      throw new IllegalArgumentException(ex);
    }
    fields.remove(ZIP64_HEADER_ID);
    this.fields = 0 < fields.size() ? fields : null;
  } else {
    this.fields = null;
  }
}
origin: de.schlichtherle.truezip/truezip-driver-zip

@Before
public void setUp() {
  fields = new ExtraFields();
  serialized = SERIALIZED.clone();
}
origin: de.schlichtherle.truezip/truezip-driver-zip

private byte[] getExtraFields(final boolean zip64) {
  ExtraFields fields = this.fields;
  if (zip64) {
    final ExtraField field = composeZip64ExtraField();
    if (null != field) {
      fields = null != fields ? fields.clone() : new ExtraFields();
      fields.add(field);
    }
  } else {
    assert null == fields || null == fields.get(ZIP64_HEADER_ID);
  }
  return null == fields ? EMPTY : fields.getExtra();
}
de.schlichtherle.truezip.zipExtraFields<init>

Popular methods of ExtraFields

  • add
    Stores the given Extra Field in this collection.
  • get
    Returns the Extra Field with the given Header ID or nullif no such Extra Field exists.
  • getExtra
    Returns a protective copy of the Extra Fields. null is never returned.
  • getExtraLength
    Returns the number of bytes required to hold the Extra Fields.
  • readFrom
    Deserializes this collection of extra fields from the data block starting at the zero based offset o
  • remove
    Removes the Extra Field with the given Header ID.
  • clone
    Returns a shallow clone of this collection.
  • doSomethingWithExtraFields
  • size
    Returns the number of Extra Fields in this collection.
  • writeTo
    Serializes a list of Extra Fields of #getExtraLength bytes to the byte array data at the zero based

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now