Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 25th, 2005, 10:34 AM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Java View Buffers

In Java, you can create view buffers for putting primitive types into a buffer. To get a view buffer you use as<Type>Buffer(). When you write to a view buffer, you then have to go back and update the position of the original ByteBuffer.

Q1. What would be the reason an asByteBuffer() method is not implemented in the view buffers? This would not only be convenient, but less error prone to miscalculation by a programmer.

Q2. Is it bad OOD practice to put these kind of methods in child classes?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent - Send mail with plain view and html view ashish.dadhwal ASP.NET 2.0 Professional 0 November 27th, 2008 01:49 AM
Buffers, InputStream & ByteArrayOutputStream erobb BOOK: Beginning Java 2 0 March 21st, 2008 01:01 AM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 06:25 PM
populate details view or list view non empty rows iinfoque ASP.NET 2.0 Basics 0 March 11th, 2007 06:11 AM
Tree View Control Java script Expand /CollpaseAll Ram Naresh General .NET 0 July 10th, 2006 05:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.