Tabnine Logo
ByteVector.putByteArray
Code IndexAdd Tabnine to your IDE (free)

How to use
putByteArray
method
in
jersey.repackaged.org.objectweb.asm.ByteVector

Best Java code snippets using jersey.repackaged.org.objectweb.asm.ByteVector.putByteArray (Showing top 20 results out of 315)

origin: com.sun.jersey/jersey-server

/**
 * Puts the annotations of this annotation writer list into the given byte
 * vector.
 *
 * @param out
 *            where the annotations must be put.
 */
void put(final ByteVector out) {
  int n = 0;
  int size = 2;
  AnnotationWriter aw = this;
  AnnotationWriter last = null;
  while (aw != null) {
    ++n;
    size += aw.bv.length;
    aw.visitEnd(); // in case user forgot to call visitEnd
    aw.prev = last;
    last = aw;
    aw = aw.next;
  }
  out.putInt(size);
  out.putShort(n);
  aw = last;
  while (aw != null) {
    out.putByteArray(aw.bv.data, 0, aw.bv.length);
    aw = aw.prev;
  }
}
origin: com.sun.jersey/jersey-server

ByteVector b = attr.write(cw, code, len, maxStack, maxLocals);
out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
out.putByteArray(b.data, 0, b.length);
attr = attr.next;
origin: com.sun.jersey/jersey-server

@Override
public void visitTableSwitchInsn(final int min, final int max,
    final Label dflt, final Label... labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.TABLESWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(min).putInt(max);
  for (int i = 0; i < labels.length; ++i) {
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: com.sun.jersey/jersey-server

@Override
public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
    final Label[] labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.LOOKUPSWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(labels.length);
  for (int i = 0; i < labels.length; ++i) {
    code.putInt(keys[i]);
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: com.sun.jersey/jersey-server

aw = last;
while (aw != null) {
  out.putByteArray(aw.bv.data, 0, aw.bv.length);
  aw = aw.prev;
origin: com.sun.jersey/jersey-server

} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
  out.putByteArray(typePath.b, typePath.offset, length);
origin: com.sun.jersey/jersey-server

bootstrapMethods.putByteArray(b, u + 10, attrSize - 2);
classWriter.bootstrapMethodsCount = boostrapMethodCount;
classWriter.bootstrapMethods = bootstrapMethods;
origin: com.sun.jersey/jersey-server

} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
  bv.putByteArray(typePath.b, typePath.offset, length);
origin: com.sun.jersey/jersey-server

  newCode.putByteArray(null, 0, (4 - newCode.length % 4) % 4);
  label = v + readInt(b, u);
  u += 4;
  newCode.putByteArray(null, 0, (4 - newCode.length % 4) % 4);
  label = v + readInt(b, u);
  u += 4;
  opcode = b[u + 1] & 0xFF;
  if (opcode == Opcodes.IINC) {
    newCode.putByteArray(b, u, 6);
    u += 6;
  } else {
    newCode.putByteArray(b, u, 4);
    u += 4;
case ClassWriter.SBYTE_INSN:
case ClassWriter.LDC_INSN:
  newCode.putByteArray(b, u, 2);
  u += 2;
  break;
case ClassWriter.TYPE_INSN:
case ClassWriter.IINC_INSN:
  newCode.putByteArray(b, u, 3);
  u += 3;
  break;
case ClassWriter.ITFMETH_INSN:
case ClassWriter.INDYMETH_INSN:
origin: com.sun.jersey/jersey-server

out.putShort(access & ~mask).putShort(name).putShort(desc);
if (classReaderOffset != 0) {
  out.putByteArray(cw.cr.b, classReaderOffset, classReaderLength);
  return;
  out.putInt(code.length).putByteArray(code.data, 0, code.length);
  out.putShort(handlerCount);
  if (handlerCount > 0) {
    out.putShort(cw.newUTF8("LocalVariableTable"));
    out.putInt(localVar.length + 2).putShort(localVarCount);
    out.putByteArray(localVar.data, 0, localVar.length);
    out.putByteArray(localVarType.data, 0, localVarType.length);
    out.putByteArray(lineNumber.data, 0, lineNumber.length);
    out.putShort(cw.newUTF8(zip ? "StackMapTable" : "StackMap"));
    out.putInt(stackMap.length + 2).putShort(frameCount);
    out.putByteArray(stackMap.data, 0, stackMap.length);
  out.putInt(methodParameters.length + 1).putByte(
      methodParametersCount);
  out.putByteArray(methodParameters.data, 0, methodParameters.length);
  out.putByteArray(annd.data, 0, annd.length);
origin: com.sun.jersey/jersey-server

classWriter.pool.putByteArray(b, off, header - off);
classWriter.items = items2;
classWriter.threshold = (int) (0.75d * ll);
origin: com.sun.jersey/jersey-server

out.putShort(index).putByteArray(pool.data, 0, pool.length);
int mask = Opcodes.ACC_DEPRECATED | ACC_SYNTHETIC_ATTRIBUTE
    | ((access & ACC_SYNTHETIC_ATTRIBUTE) / TO_ACC_SYNTHETIC);
  out.putInt(bootstrapMethods.length + 2).putShort(
      bootstrapMethodsCount);
  out.putByteArray(bootstrapMethods.data, 0, bootstrapMethods.length);
  int len = sourceDebug.length;
  out.putShort(newUTF8("SourceDebugExtension")).putInt(len);
  out.putByteArray(sourceDebug.data, 0, len);
  out.putShort(newUTF8("InnerClasses"));
  out.putInt(innerClasses.length + 2).putShort(innerClassesCount);
  out.putByteArray(innerClasses.data, 0, innerClasses.length);
origin: org.glassfish.jersey.core/jersey-server

/**
 * Puts the annotations of this annotation writer list into the given byte
 * vector.
 *
 * @param out
 *            where the annotations must be put.
 */
void put(final ByteVector out) {
  int n = 0;
  int size = 2;
  AnnotationWriter aw = this;
  AnnotationWriter last = null;
  while (aw != null) {
    ++n;
    size += aw.bv.length;
    aw.visitEnd(); // in case user forgot to call visitEnd
    aw.prev = last;
    last = aw;
    aw = aw.next;
  }
  out.putInt(size);
  out.putShort(n);
  aw = last;
  while (aw != null) {
    out.putByteArray(aw.bv.data, 0, aw.bv.length);
    aw = aw.prev;
  }
}
origin: org.glassfish.jersey.core/jersey-server

@Override
public void visitTableSwitchInsn(final int min, final int max,
                 final Label dflt, final Label... labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.TABLESWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(min).putInt(max);
  for (int i = 0; i < labels.length; ++i) {
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.glassfish.jersey.core/jersey-server

ByteVector b = attr.write(cw, code, len, maxStack, maxLocals);
out.putShort(cw.newUTF8(attr.type)).putInt(b.length);
out.putByteArray(b.data, 0, b.length);
attr = attr.next;
origin: org.glassfish.jersey.core/jersey-server

@Override
public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
                 final Label[] labels) {
  lastCodeOffset = code.length;
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.LOOKUPSWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(labels.length);
  for (int i = 0; i < labels.length; ++i) {
    code.putInt(keys[i]);
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.glassfish.jersey.core/jersey-server

aw = last;
while (aw != null) {
  out.putByteArray(aw.bv.data, 0, aw.bv.length);
  aw = aw.prev;
origin: org.glassfish.jersey.core/jersey-server

} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
  out.putByteArray(typePath.b, typePath.offset, length);
origin: org.glassfish.jersey.core/jersey-server

bootstrapMethods.putByteArray(b, u + 10, attrSize - 2);
classWriter.bootstrapMethodsCount = boostrapMethodCount;
classWriter.bootstrapMethods = bootstrapMethods;
origin: org.glassfish.jersey.core/jersey-server

} else {
  int length = typePath.b[typePath.offset] * 2 + 1;
  bv.putByteArray(typePath.b, typePath.offset, length);
jersey.repackaged.org.objectweb.asmByteVectorputByteArray

Javadoc

Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.

Popular methods of ByteVector

  • <init>
    Constructs a new ByteVector with the given initial size.
  • encodeUTF8
    Puts an UTF8 string into this byte vector. The byte vector is automatically enlarged if necessary. T
  • enlarge
    Enlarge this byte vector so that it can receive n more bytes.
  • 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.
  • 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.
  • addElement
  • toArray
  • addElement,
  • toArray

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • String (java.lang)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • BoxLayout (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 12 Jupyter Notebook extensions
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