Codota Logo
ByteVector.enlarge
Code IndexAdd Codota to your IDE (free)

How to use
enlarge
method
in
org.mvel2.asm.ByteVector

Best Java code snippets using org.mvel2.asm.ByteVector.enlarge (Showing top 20 results out of 315)

  • Common ways to obtain ByteVector
private void myMethod () {
ByteVector b =
  • Codota Iconnew ByteVector()
  • Codota Iconnew ByteVector(initialCapacity)
  • Smart code suggestions by Codota
}
origin: org.mvel/mvel2

/**
 * Puts a byte into this byte vector. The byte vector is automatically enlarged if necessary.
 *
 * @param byteValue a byte.
 * @return this byte vector.
 */
public ByteVector putByte(final int byteValue) {
 int currentLength = length;
 if (currentLength + 1 > data.length) {
  enlarge(1);
 }
 data[currentLength++] = (byte) byteValue;
 length = currentLength;
 return this;
}
origin: org.mvel/mvel2

/**
 * Puts two bytes into this byte vector. The byte vector is automatically enlarged if necessary.
 *
 * @param byteValue1 a byte.
 * @param byteValue2 another byte.
 * @return this byte vector.
 */
final ByteVector put11(final int byteValue1, final int byteValue2) {
 int currentLength = length;
 if (currentLength + 2 > data.length) {
  enlarge(2);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) byteValue1;
 currentData[currentLength++] = (byte) byteValue2;
 length = currentLength;
 return this;
}
origin: org.mvel/mvel2

/**
 * Puts a short into this byte vector. The byte vector is automatically enlarged if necessary.
 *
 * @param shortValue a short.
 * @return this byte vector.
 */
public ByteVector putShort(final int shortValue) {
 int currentLength = length;
 if (currentLength + 2 > data.length) {
  enlarge(2);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) (shortValue >>> 8);
 currentData[currentLength++] = (byte) shortValue;
 length = currentLength;
 return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts a byte into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 *
 * @param b a byte.
 * @return this byte vector.
 */
public ByteVector putByte(final int b) {
  int length = this.length;
  if (length + 1 > data.length) {
    enlarge(1);
  }
  data[length++] = (byte) b;
  this.length = length;
  return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts a byte into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 * 
 * @param b
 *            a byte.
 * @return this byte vector.
 */
public ByteVector putByte(final int b) {
  int length = this.length;
  if (length + 1 > data.length) {
    enlarge(1);
  }
  data[length++] = (byte) b;
  this.length = length;
  return this;
}
origin: org.mvel/mvel2

/**
 * Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
 *
 * @param intValue an int.
 * @return this byte vector.
 */
public ByteVector putInt(final int intValue) {
 int currentLength = length;
 if (currentLength + 4 > data.length) {
  enlarge(4);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) (intValue >>> 24);
 currentData[currentLength++] = (byte) (intValue >>> 16);
 currentData[currentLength++] = (byte) (intValue >>> 8);
 currentData[currentLength++] = (byte) intValue;
 length = currentLength;
 return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts a short into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 *
 * @param s a short.
 * @return this byte vector.
 */
public ByteVector putShort(final int s) {
  int length = this.length;
  if (length + 2 > data.length) {
    enlarge(2);
  }
  byte[] data = this.data;
  data[length++] = (byte) (s >>> 8);
  data[length++] = (byte) s;
  this.length = length;
  return this;
}
origin: org.mvel/mvel2

/**
 * Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if
 * necessary.
 *
 * @param byteValue a byte.
 * @param shortValue a short.
 * @return this byte vector.
 */
final ByteVector put12(final int byteValue, final int shortValue) {
 int currentLength = length;
 if (currentLength + 3 > data.length) {
  enlarge(3);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) byteValue;
 currentData[currentLength++] = (byte) (shortValue >>> 8);
 currentData[currentLength++] = (byte) shortValue;
 length = currentLength;
 return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts a byte and a short into this byte vector. The byte vector is
 * automatically enlarged if necessary.
 *
 * @param b a byte.
 * @param s a short.
 * @return this byte vector.
 */
ByteVector put12(final int b, final int s) {
  int length = this.length;
  if (length + 3 > data.length) {
    enlarge(3);
  }
  byte[] data = this.data;
  data[length++] = (byte) b;
  data[length++] = (byte) (s >>> 8);
  data[length++] = (byte) s;
  this.length = length;
  return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts a short into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 * 
 * @param s
 *            a short.
 * @return this byte vector.
 */
public ByteVector putShort(final int s) {
  int length = this.length;
  if (length + 2 > data.length) {
    enlarge(2);
  }
  byte[] data = this.data;
  data[length++] = (byte) (s >>> 8);
  data[length++] = (byte) s;
  this.length = length;
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts two bytes into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 *
 * @param b1 a byte.
 * @param b2 another byte.
 * @return this byte vector.
 */
ByteVector put11(final int b1, final int b2) {
  int length = this.length;
  if (length + 2 > data.length) {
    enlarge(2);
  }
  byte[] data = this.data;
  data[length++] = (byte) b1;
  data[length++] = (byte) b2;
  this.length = length;
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts an int into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 *
 * @param i an int.
 * @return this byte vector.
 */
public ByteVector putInt(final int i) {
  int length = this.length;
  if (length + 4 > data.length) {
    enlarge(4);
  }
  byte[] data = this.data;
  data[length++] = (byte) (i >>> 24);
  data[length++] = (byte) (i >>> 16);
  data[length++] = (byte) (i >>> 8);
  data[length++] = (byte) i;
  this.length = length;
  return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts an int into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 * 
 * @param i
 *            an int.
 * @return this byte vector.
 */
public ByteVector putInt(final int i) {
  int length = this.length;
  if (length + 4 > data.length) {
    enlarge(4);
  }
  byte[] data = this.data;
  data[length++] = (byte) (i >>> 24);
  data[length++] = (byte) (i >>> 16);
  data[length++] = (byte) (i >>> 8);
  data[length++] = (byte) i;
  this.length = length;
  return this;
}
origin: org.mvel/mvel2

/**
 * Puts two bytes and a short into this byte vector. The byte vector is automatically enlarged if
 * necessary.
 *
 * @param byteValue1 a byte.
 * @param byteValue2 another byte.
 * @param shortValue a short.
 * @return this byte vector.
 */
final ByteVector put112(final int byteValue1, final int byteValue2, final int shortValue) {
 int currentLength = length;
 if (currentLength + 4 > data.length) {
  enlarge(4);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) byteValue1;
 currentData[currentLength++] = (byte) byteValue2;
 currentData[currentLength++] = (byte) (shortValue >>> 8);
 currentData[currentLength++] = (byte) shortValue;
 length = currentLength;
 return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts a byte and a short into this byte vector. The byte vector is
 * automatically enlarged if necessary.
 * 
 * @param b
 *            a byte.
 * @param s
 *            a short.
 * @return this byte vector.
 */
ByteVector put12(final int b, final int s) {
  int length = this.length;
  if (length + 3 > data.length) {
    enlarge(3);
  }
  byte[] data = this.data;
  data[length++] = (byte) b;
  data[length++] = (byte) (s >>> 8);
  data[length++] = (byte) s;
  this.length = length;
  return this;
}
origin: org.mvel/mvel2

/**
 * Puts one byte and two shorts into this byte vector. The byte vector is automatically enlarged
 * if necessary.
 *
 * @param byteValue a byte.
 * @param shortValue1 a short.
 * @param shortValue2 another short.
 * @return this byte vector.
 */
final ByteVector put122(final int byteValue, final int shortValue1, final int shortValue2) {
 int currentLength = length;
 if (currentLength + 5 > data.length) {
  enlarge(5);
 }
 byte[] currentData = data;
 currentData[currentLength++] = (byte) byteValue;
 currentData[currentLength++] = (byte) (shortValue1 >>> 8);
 currentData[currentLength++] = (byte) shortValue1;
 currentData[currentLength++] = (byte) (shortValue2 >>> 8);
 currentData[currentLength++] = (byte) shortValue2;
 length = currentLength;
 return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts two bytes into this byte vector. The byte vector is automatically
 * enlarged if necessary.
 * 
 * @param b1
 *            a byte.
 * @param b2
 *            another byte.
 * @return this byte vector.
 */
ByteVector put11(final int b1, final int b2) {
  int length = this.length;
  if (length + 2 > data.length) {
    enlarge(2);
  }
  byte[] data = this.data;
  data[length++] = (byte) b1;
  data[length++] = (byte) b2;
  this.length = length;
  return this;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.mvel

/**
 * Puts an array of bytes into this byte vector. The byte vector is
 * automatically enlarged if necessary.
 *
 * @param b   an array of bytes. May be <tt>null</tt> to put <tt>len</tt>
 *            null bytes into this byte vector.
 * @param off index of the fist byte of b that must be copied.
 * @param len number of bytes of b that must be copied.
 * @return this byte vector.
 */
public ByteVector putByteArray(final byte[] b, final int off, final int len) {
  if (length + len > data.length) {
    enlarge(len);
  }
  if (b != null) {
    System.arraycopy(b, off, data, length, len);
  }
  length += len;
  return this;
}
origin: org.mvel/mvel2

/**
 * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if
 * necessary.
 *
 * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} null
 *     bytes into this byte vector.
 * @param byteOffset index of the first byte of byteArrayValue that must be copied.
 * @param byteLength number of bytes of byteArrayValue that must be copied.
 * @return this byte vector.
 */
public ByteVector putByteArray(
  final byte[] byteArrayValue, final int byteOffset, final int byteLength) {
 if (length + byteLength > data.length) {
  enlarge(byteLength);
 }
 if (byteArrayValue != null) {
  System.arraycopy(byteArrayValue, byteOffset, data, length, byteLength);
 }
 length += byteLength;
 return this;
}
origin: io.virtdata/virtdata-lib-realer

/**
 * Puts an array of bytes into this byte vector. The byte vector is
 * automatically enlarged if necessary.
 * 
 * @param b
 *            an array of bytes. May be <tt>null</tt> to put <tt>len</tt>
 *            null bytes into this byte vector.
 * @param off
 *            index of the fist byte of b that must be copied.
 * @param len
 *            number of bytes of b that must be copied.
 * @return this byte vector.
 */
public ByteVector putByteArray(final byte[] b, final int off, final int len) {
  if (length + len > data.length) {
    enlarge(len);
  }
  if (b != null) {
    System.arraycopy(b, off, data, length, len);
  }
  length += len;
  return this;
}
org.mvel2.asmByteVectorenlarge

Javadoc

Enlarges this byte vector so that it can receive 'size' more bytes.

Popular methods of ByteVector

  • <init>
    Constructs a new ByteVector from the given initial data.
  • put11
    Puts two bytes into this byte vector. The byte vector is automatically enlarged if necessary.
  • put12
    Puts a byte and a short into this byte vector. The byte vector is automatically enlarged if necessar
  • putByte
    Puts a byte into this byte vector. The byte vector is automatically enlarged if necessary.
  • putByteArray
    Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary
  • putInt
    Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
  • putLong
    Puts a long into this byte vector. The byte vector is automatically enlarged if necessary.
  • putShort
    Puts a short into this byte vector. The byte vector is automatically enlarged if necessary.
  • putUTF8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary.
  • encodeUTF8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. T
  • encodeUtf8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. T
  • put112
    Puts two bytes and a short into this byte vector. The byte vector is automatically enlarged if neces
  • encodeUtf8,
  • put112,
  • put122

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getSystemService (Context)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now