Examples of code()


Examples of io.netty.handler.codec.http.HttpResponseStatus.code()

        render(context, status.reasonPhrase(), w ->
            messages(w, "Client Error", () ->
                meta(w, m -> m
                    .put("URI:", request.getRawUri())
                    .put("Method:", request.getMethod().getName())
                    .put("Status Code:", status.code())
                    .put("Phrase:", status.reasonPhrase())
                )
            )
        );
      }
View Full Code Here

Examples of io.vertx.core.dns.DnsException.code()

  @Test
  public void testLookupNonExisting() throws Exception {
    DnsClient dns = prepareDns(FakeDNSServer.testLookupNonExisting());
    dns.lookup("gfegjegjf.sg1", ar -> {
      DnsException cause = (DnsException)ar.cause();
      assertEquals(DnsResponseCode.NXDOMAIN, cause.code());
      testComplete();
    });
    await();
  }
View Full Code Here

Examples of kyotocabinet.Error.code()

  logger.debug("Using kyoto path {}", kyotoPath);
        if (!db.open(kyotoPath, DB.OWRITER | DB.OCREATE)) {
            // error occurred while opening, throw error
      Error error = db.error();
            db = null;
            throw new DataStoreFatalException("Unable to open " + toString() + " @ " + path + " {code=" + error.code() + ", message=" + error.message() + "}");
        }

        if (this.synchronizeInterval < 0) {
            logger.debug("Automatic sync disabled {synchronizeInterval < 0} for " + toString());
        } else if (this.synchronizeInterval == 0) {
View Full Code Here

Examples of lzma.LzmaDecoder.code()

        executor.scheduleAtFixedRate(new ByteBufferProgress(bbc), 2, 1, TimeUnit.SECONDS);
       
        try {
            InputStream is = new ByteBufferInputStream(bbc);
            OutputStream os = new ByteBufferOutputStream(bbu);
            if (!dec.code(is, os, lzmaSize)) {
                throw new IOException("LZMA decoding error");
            }
        } finally {   
            executor.shutdown();
        }
View Full Code Here

Examples of lzma.LzmaEncoder.code()

        executor.scheduleAtFixedRate(new ByteBufferProgress(bbu), 2, 2, TimeUnit.SECONDS);
       
        try {
            InputStream is = new ByteBufferInputStream(bbu);
            OutputStream os = new ByteBufferOutputStream(bbc);
            enc.code(is, os);
        } finally {
            executor.shutdown();
        }
       
        bbc.flip();
View Full Code Here

Examples of lzma.sdk.lzma.Decoder.code()

            {
                throw new IOException("Can't read stream size");
            }
            outSize |= ((long) v) << (8 * i);
        }
        if (!decoder.code(in, out, outSize))
        {
            throw new IOException("Error in data stream");
        }
        out.flush();
        out.close();
View Full Code Here

Examples of lzma.sdk.lzma.Encoder.code()

        long fileSize = sourceFile.length();
        for (int i = 0; i < 8; i++)
        {
            out.write((int) (fileSize >>> (8 * i)) & 0xFF);
        }
        encoder.code(in, out, -1, -1, null);
        out.flush();
        out.close();
        in.close();

        // decompressing
View Full Code Here

Examples of net.loyin.jFinal.anatation.PowerBind.code()

      boolean v=true;
      String code=null;
      PowerBind p=ai.getController().getClass().getAnnotation(PowerBind.class);
      if(p!=null){
        v=p.v();
        code=p.code();
      }
      p=ai.getMethod().getAnnotation(PowerBind.class);
      if(p!=null){
        v=p.v();
        code=p.code();
View Full Code Here

Examples of org.apache.isis.core.metamodel.adapter.ResolveState.code()

            Assert.assertTrue("only resolve object that is persistent", adapter, adapter.isPersistent());
            resolveImmediatelyFromPersistenceLayer(adapter);
            if (LOG.isDebugEnabled()) {
                // don't log object - its toString() may use the unresolved
                // field, or unresolved collection
                LOG.debug("resolved: " + adapter.getSpecification().getShortIdentifier() + " " + resolveState.code() + " " + adapter.getOid());
            }
        }
    }

    private void resolveImmediatelyFromPersistenceLayer(final ObjectAdapter adapter) {
View Full Code Here

Examples of org.apache.mina.http.api.HttpStatus.code()

        final String[] elements = RESPONSE_LINE_PATTERN.split(requestLine);
        HttpStatus status = null;
        final int statusCode = Integer.valueOf(elements[1]);
        for (int i = 0; i < HttpStatus.values().length; i++) {
            status = HttpStatus.values()[i];
            if (statusCode == status.code()) {
                break;
            }
        }
        final HttpVersion version = HttpVersion.fromString(elements[0]);
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.