Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Buffer Overflow & J2EE

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can buffer overflow in a Java/J2EE-Application occur? Should we actively take it to consideration designing a J2EE-based apllication?

Thank you in advance,
Kha Nguyen
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by kha nguyen:
Can buffer overflow in a Java/J2EE-Application occur? Should we actively take it to consideration designing a J2EE-based apllication?

Thank you in advance,
Kha Nguyen



Hi Kha,
the short answer is yes, it 'can' occur. When it does, it is considered a system level error and there is nothing you can directly do. (Because it extends RuntimeException).

Go here "http://java.sun.com/javase/6/docs/api/" to see a list of all Java clases available in Java6 SE edition. Somewhere down the list, is a class called BufferOverflowException, in the java.nio package. (Also possible, is a BufferUnderflowException as well).

These are both class extensions of the more generic RuntimeException class, which Java programs (and consequently J2EE programs) do not need to explicitly catch in their try-catch blocks. So, technically, you do not explicitly need to design for their occurrence. You do need some sort of behavior for RuntimeExceptions in general, though. (Even if that is simply that the runtime exception bubbles up to the main() method call and the program exits).

But this question doesn't belong in the SCEA forum. It is a Java language specific question, I believe.
Thanks,
-jeff
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic