Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Buffer Overflow & J2EE

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic