Examples of toByteArray()


Examples of jodd.io.FastByteArrayOutputStream.toByteArray()

        putFile(header.formFieldName, newFile);
      } else {
        // no file, therefore it is regular form parameter.
        FastByteArrayOutputStream fbos = new FastByteArrayOutputStream();
        input.copyAll(fbos);
        String value = encoding != null ? new String(fbos.toByteArray(), encoding) : new String(fbos.toByteArray());
        putParameter(header.formFieldName, value);
      }

      input.skipBytes(1);
      input.mark(1);
View Full Code Here

Examples of krati.retention.clock.Clock.toByteArray()

               
                byte[] value = e.getValue().getValue();
                kvc.put("value", value == null ? null : ByteBuffer.wrap(value));
               
                Clock clock = clockNotNeeded ? null : e.getValue().getClock();
                kvc.put("clock", clock == null ? null : ByteBuffer.wrap(clock.toByteArray()));
               
                array.add(kvc);
            }
           
            GenericRecord response = new GenericData.Record(schema1);
View Full Code Here

Examples of logisticspipes.network.LPDataOutputStream.toByteArray()

                LPDataOutputStream t = new LPDataOutputStream();
                t.writeShort(packet.getId());
                t.writeInt(packet.getDebugId());
                packet.writeData(t);
                data.writeInt(t.size());
                data.write(t.toByteArray());
              }
              packets.clear();
              clearLock.unlock();
              clientBuffer = out.toByteArray();
            }
View Full Code Here

Examples of macromedia.asc.util.ByteList.toByteArray()

      BytecodeBuffer bc = new BytecodeBuffer(bl.toByteArray(false));
      if (bc.readU8() == CONSTANT_Qname)
      {
        int ns_index = bc.readU32();
        ByteList nsbl = ab.constant_ns_pool.get(ns_index-1);
        BytecodeBuffer nsbc = new BytecodeBuffer(nsbl.toByteArray(false));
        int nskind = nsbc.readU8();
        if (nskind == CONSTANT_Namespace || nskind == CONSTANT_PackageNamespace)
        {
          int uri_index = nsbc.readU32();
          int name_index = bc.readU32();
View Full Code Here

Examples of net.i2p.util.NativeBigInteger.toByteArray()

      Logger.minor(this, "My exponential: "+HexUtil.toHexString(myExponential));
      Logger.minor(this, "Peer's exponential: "+HexUtil.toHexString(peerExponential));
      Logger.minor(this, "g^ir mod p = " + HexUtil.toHexString(sharedSecret));
    }
   
    return sharedSecret.toByteArray();
  }

    @Override
    public byte[] getPublicKeyNetworkFormat() {
        return stripBigIntegerToNetworkFormat(myExponential);
View Full Code Here

Examples of net.janino.util.ClassFile.toByteArray()

        // Add the generated class files to the {@link ByteArrayClassLoader}.
        for (int i = 0; i < classFiles.length; ++i) {
            ClassFile cf = classFiles[i];
            String className = cf.getThisClassName();
            if (EvaluatorBase.DEBUG) System.out.println("Define class \"" + className  + "\".");
            this.byteArrayClassLoader.addClass(className, cf.toByteArray());
        }

        return this.byteArrayClassLoader;
    }
View Full Code Here

Examples of net.sf.cglib.asm.ClassWriter.toByteArray()

                           argsAndReturn.toString(),
                           null,
                           new String[] {"java/rmi/RemoteException"});
        }
        cw.visitEnd();
        return cw.toByteArray();
    }

    protected Class<?> getTargetJavaClass(Interface targetInterface) {
        // TODO: right now assume that the target is always a Java
        // Implementation. Need to figure out
View Full Code Here

Examples of net.sf.cglib.core.DebuggingClassWriter.toByteArray()

        reader = new ClassReader( new ByteArrayInputStream( classfileBuffer ) );
        new TransformingClassGenerator(
            new ClassReaderGenerator( reader, attributes(), skipDebug() ), t
        ).generateClass( w );
        out = new ByteArrayOutputStream();
        out.write( w.toByteArray() );
        result = out.toByteArray();
        out.close();
      }
      catch (Exception e) {
        log.error( "Unable to transform class", e );
View Full Code Here

Examples of net.sf.cram.io.ExposedByteArrayOutputStream.toByteArray()

      headerOS.write(headerBodyOS.getBuffer(), 0, headerBodyOS.size());
    } catch (IOException e) {
      throw new RuntimeException(e);
    }

    return headerOS.toByteArray();
  }

  private static long writeContainer(SAMFileHeader samFileHeader,
      OutputStream os) throws IOException {
    Block block = new Block();
View Full Code Here

Examples of net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.toByteArray()

                bufferLength = buffer.size();
                DiskElement diskElement = checkForFreeBlock(bufferLength);

                // Write the record
                randomAccessFile.seek(diskElement.position);
                randomAccessFile.write(buffer.toByteArray(), 0, bufferLength);
                buffer = null;

                // Add to index, update stats
                diskElement.payloadSize = bufferLength;
                diskElement.key = key;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.