test/java/nio/Buffer/Basic.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /* @test
  25  * @summary Unit test for buffers
  26  * @bug 4413135 4414911 4416536 4416562 4418782 4471053 4472779 4490253 4523725
  27  *      4526177 4463011 4660660 4661219 4663521 4782970 4804304 4938424 6231529
  28  *      6221101 6234263 6535542 6591971 6593946
  29  * @author Mark Reinhold
  30  */
  31 
  32 
  33 import java.io.PrintStream;
  34 
  35 import java.nio.Buffer;
  36 import java.nio.ByteBuffer;
  37 import java.nio.CharBuffer;
  38 
  39 
  40 public class Basic {
  41 
  42     static PrintStream out = System.err;
  43 
  44     static long ic(int i) {
  45         int j = i % 54;
  46         return j + 'a' + ((j > 26) ? 128 : 0);
  47     }
  48 




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  */
  23 
  24 /* @test
  25  * @summary Unit test for buffers
  26  * @bug 4413135 4414911 4416536 4416562 4418782 4471053 4472779 4490253 4523725
  27  *      4526177 4463011 4660660 4661219 4663521 4782970 4804304 4938424 6231529
  28  *      6221101 6234263 6535542 6591971 6593946 6795561
  29  * @author Mark Reinhold
  30  */
  31 
  32 
  33 import java.io.PrintStream;
  34 
  35 import java.nio.Buffer;
  36 import java.nio.ByteBuffer;
  37 import java.nio.CharBuffer;
  38 
  39 
  40 public class Basic {
  41 
  42     static PrintStream out = System.err;
  43 
  44     static long ic(int i) {
  45         int j = i % 54;
  46         return j + 'a' + ((j > 26) ? 128 : 0);
  47     }
  48