test/jdk/java/net/httpclient/http2/server/BodyInputStream.java
branchhttp-client-branch
changeset 56009 cf8792f51dee
parent 55973 4d9b002587db
child 56089 42208b2f224e
equal deleted inserted replaced
56008:bbd688c6fbbb 56009:cf8792f51dee
     1 /*
     1 /*
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   120     public int read() throws IOException {
   120     public int read() throws IOException {
   121         int c = read(one, 0, 1);
   121         int c = read(one, 0, 1);
   122         if (c == -1) {
   122         if (c == -1) {
   123             return -1;
   123             return -1;
   124         }
   124         }
   125         return one[0];
   125         return one[0] & 0xFF;
   126     }
   126     }
   127 
   127 
   128     @Override
   128     @Override
   129     public void close() {
   129     public void close() {
   130         // TODO reset this stream
   130         // TODO reset this stream