Examples of copy()


Examples of io.netty.handler.codec.http.DefaultFullHttpRequest.copy()

        if (method.toString().equals(info.req.getMethod().toString())) {
            if (info.req instanceof DefaultFullHttpRequest) {
                DefaultFullHttpRequest dfrq = (DefaultFullHttpRequest) info.req;
                FullHttpRequest rq;
                try {
                    rq = dfrq.copy();
                } catch (IllegalReferenceCountException e) { // Empty bytebuf
                    rq = dfrq;
                }
                rq.setUri(url.getPathAndQuery());
                nue = rq;
View Full Code Here

Examples of io.netty.handler.codec.http.HttpContent.copy()

            public void receive(State<?> state) {
                System.out.println("STATE " + state);
                seen.add(state.stateType());
                if (state.get() instanceof HttpContent) {
                    HttpContent content = (HttpContent) state.get();
                    ByteBuf bb = content.copy().content();
                    System.out.println("CHUNK " + bb.readableBytes() + " bytes");
                } else if (state.get() instanceof HttpResponse) {
//                    System.out.println("HEADERS: " + ((HttpResponse) state.get()).headers());
//                    for (Map.Entry<String,String> e : ((HttpResponse) state.get()).headers().entries()) {
//                        System.out.println(e.getKey() + ": " + e.getValue());
View Full Code Here

Examples of io.vertx.core.buffer.Buffer.copy()

        NetSocket sock = ar.result();
        assertFalse(sock.writeQueueFull());
        sock.setWriteQueueMaxSize(1000);
        Buffer buff = TestUtils.randomBuffer(10000);
        vertx.setPeriodic(1, id -> {
          sock.write(buff.copy());
          if (sock.writeQueueFull()) {
            vertx.cancelTimer(id);
            sock.drainHandler(v -> {
              assertFalse(sock.writeQueueFull());
              testComplete();
View Full Code Here

Examples of io.vertx.core.json.JsonArray.copy()

  public void testInvalidValsOnCopy() {
    List<Object> invalid = new ArrayList<>();
    invalid.add(new SomeClass());
    JsonArray arr = new JsonArray(invalid);
    try {
      arr.copy();
      fail();
    } catch (IllegalStateException e) {
      // OK
    }
  }
View Full Code Here

Examples of io.vertx.core.json.JsonObject.copy()

  public void testInvalidValsOnCopy1() {
    Map<String, Object> invalid = new HashMap<>();
    invalid.put("foo", new SomeClass());
    JsonObject object = new JsonObject(invalid);
    try {
      object.copy();
      fail();
    } catch (IllegalStateException e) {
      // OK
    }
  }
View Full Code Here

Examples of it.unimi.dsi.lang.MutableString.copy()

              MutableString text = new MutableString();
              VirtualDocumentFragment[] fragArray = new VirtualDocumentFragment[ nfrag ];
              for ( int i = 0; i < nfrag; i++ ) {
                doc.readSelfDelimUTF8( rawContent );
                text.readSelfDelimUTF8( rawContent );
                fragArray[ i ] = new AnchorExtractor.Anchor( doc.copy(), text.copy() );
              }
              result = new ObjectArrayList<VirtualDocumentFragment>( fragArray );
            }
            else if ( fieldType( nextFieldToRead ) != FieldType.TEXT ) {
              result = new ObjectInputStream( rawContent ).readObject();
View Full Code Here

Examples of jSimMacs.logic.handler.LocalDataHandler.copy()

      if(command.equals(JFileChooser.APPROVE_SELECTION)){
        File file = fc.getSelectedFile();
        if(!file.isDirectory()){
          LocalDataHandler handler = (LocalDataHandler)DataHandlerFactory.getDataHandler(localProject);
          try {
            handler.copy(file, homePath);
          } catch (IOException e) {
            JOptionPane.showMessageDialog(this,
                "Can't copy file \n" + e.getMessage(), "Copy error",
                JOptionPane.ERROR_MESSAGE);
          }
View Full Code Here

Examples of jSimMacs.logic.handler.SSHDataHandler.copy()

    else if(source == sfc){
      if(command.equals(SSHFileChooser.APPROVE_SELECTION)){
        String file = sfc.getSelectedFile();
        SSHDataHandler handler = (SSHDataHandler)remoteProject.getDataHandler();
        try {
          handler.copy(file, homePath);
        } catch (IOException e1) {
          JOptionPane.showMessageDialog(this,
              "Can't copy file \n" + e1.getMessage(), "Copy error",
              JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

Examples of java.nio.file.spi.FileSystemProvider.copy()

        throws IOException
    {
        FileSystemProvider provider = provider(source);
        if (provider(target) == provider) {
            // same provider
            provider.copy(source, target, options);
        } else {
            // different providers
            CopyMoveHelper.copyToForeignTarget(source, target, options);
        }
        return target;
View Full Code Here

Examples of javassist.bytecode.AnnotationsAttribute.copy()

   private void copyAnnotations(javassist.bytecode.MethodInfo src, javassist.bytecode.MethodInfo dest, String annotationTag)
   {
      AnnotationsAttribute attribute = (AnnotationsAttribute) src.getAttribute(annotationTag);
      if (attribute != null)
      {
         dest.addAttribute(attribute.copy(dest.getConstPool(), EMPTY_HASHMAP));
      }
   }
  
   private void copyParameterAnnotations(int numParams, javassist.bytecode.MethodInfo src, javassist.bytecode.MethodInfo dest, String paramsTag)
   {
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.