Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3AE8D200B6C for ; Sun, 28 Aug 2016 20:06:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3949B160AB4; Sun, 28 Aug 2016 18:06:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 81A40160AA6 for ; Sun, 28 Aug 2016 20:06:55 +0200 (CEST) Received: (qmail 27848 invoked by uid 500); 28 Aug 2016 18:06:54 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 27836 invoked by uid 99); 28 Aug 2016 18:06:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Aug 2016 18:06:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 65E36C0439 for ; Sun, 28 Aug 2016 18:06:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.72 X-Spam-Level: X-Spam-Status: No, score=-0.72 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=zusammenkunft-net.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id E2DOFHZSxJjt for ; Sun, 28 Aug 2016 18:06:52 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id C877B5FBB5 for ; Sun, 28 Aug 2016 18:06:51 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id q128so51972375wma.1 for ; Sun, 28 Aug 2016 11:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zusammenkunft-net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z2vjyEvNJpI3gvIxSgh16Yv10S7PDQS7H4NdMEUrViU=; b=1zY0T6CAJRjx3t3VnV+p3RL9ZMJGzKSoyjrAo2nYELNtgD+nDGHTwUX04YIhRRD8sQ jtZNPqm6oPDKPyDXdGo40VBwgmRrHpvaJ3ZpXkzRCCVfaG51HgOlMnu2ZTVQiTBWD2DI AWpxrUi9tMYaxGoCl3xnuI+l5dnyFGQhx80rQnxvdtp75P313raWNQG3mWJrINRW7nmd KTO6gXaLRcc15CvqDsMgmKuEH57LIJJ5LW0Jo4DHQriA7P9efWa90XPc0Y79oAvoQirW AcWlt56XG803ebOuLvCQ4wZMNEKmxt+aeMqcgCqH81KPpP9cZiO4sTzJr6ca3p/qrr5r NnRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z2vjyEvNJpI3gvIxSgh16Yv10S7PDQS7H4NdMEUrViU=; b=SAsJ/7k+uCfEQcpO4K3oAxCaixFbht1ylFkhjJlHOhnZu5o+qdk8xujjIK4vEgIC0G oEO6msgEzSfDB8MhRcWSVeeXvpK+zoT4c+Qs9g17mPtXbE91QLatxN4EtDFtzCeG8ajH wP61AyCXqr4BFtnaL5R6vDZAbibRrQQQPTqyRtP7Xkxv507SzZwRKdv4Wh14ShRNYDfu cQqnXXht2xbj2W7mXeji5G/dVWt8GiyPJLYEtCxuXexTPNitPn/FPr8Buaxs6A8JFZwE lkt1B7MmcdvDuOAR+yleT303m82+byorZBr9eA8vUv9mHPvuwNXrral+bHykg8Aw8fdH pG8g== X-Gm-Message-State: AE9vXwPhxB5s2dTzpfEh19HF0PS1SWpmWXLK5N3Z/aNBzVbjWMgHvypBzSI7g3JT28bRww== X-Received: by 10.28.60.136 with SMTP id j130mr7647497wma.93.1472407610096; Sun, 28 Aug 2016 11:06:50 -0700 (PDT) Received: from localhost (HSI-KBW-109-193-068-094.hsi7.kabel-badenwuerttemberg.de. [109.193.68.94]) by smtp.googlemail.com with ESMTPSA id z17sm9574006wmz.23.2016.08.28.11.06.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Aug 2016 11:06:49 -0700 (PDT) Date: Sun, 28 Aug 2016 20:06:46 +0200 From: Bernd Eckenfels To: user@commons.apache.org Cc: Oliver Zemann Subject: Re: NPE in getRemoteAdress Message-ID: <20160828200646.00006e32.ecki@zusammenkunft.net> In-Reply-To: <52997869-39df-2a17-9256-bcba68e2f1f4@gmail.com> References: <52997869-39df-2a17-9256-bcba68e2f1f4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit archived-at: Sun, 28 Aug 2016 18:06:56 -0000 Hello, I am not sure about your NPE, but this code here ignores the result of the read call. It cannot deal with short reads: Am Sun, 28 Aug 2016 15:50:36 +0200 schrieb Oliver Zemann : > byte b[] =new byte[4096]; > while (inputStream.read(b) != -1) { > fos.write(b); > bytesWritten += b.length; Gruss Bernd --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org