Copyright ©1996,
Que Corporation. All rights reserved. No part of this book may be used
or reproduced in any form or by any means, or stored in a database or retrieval
system without prior written permission of the publisher except in the
case of brief quotations embodied in critical articles and reviews. Making
copies of any part of this book for any purpose other than your own personal
use is a violation of United States copyright laws. For information, address
Que Corporation, 201 West 103rd Street, Indianapolis, IN
46290 or at support@mcp .com.
Notice: This material is excerpted from Special
Edition Using Java, ISBN: 0-7897-0604-0. The electronic version of
this material has not been through the final proof reading stage that the
book goes through before being published in printed form. Some errors may
exist here that are corrected before the book is published. This material
is provided "as is" without any warranty of any kind.
Appendix B- Java API
by Michael Afergan
This appendix is designed to provide you with a detailed summary of
the Java Application Programming Interface (API). The Java API is a set
of classes developed by the authors of the Java language designed to assist
you in developing your own classes, applets, and applications.
The classes in the Java API are grouped into packages each of which
may have several classes and interfaces. Furthermore, each of these items
may also have several properties such as fields and/or methods.
While it is possible to program in Java without knowing too much about
the API, every class that you develop will be dependent on at least one
class within the API. Consequently, when you begin to develop more complex
programs that deal with strings, sockets, and graphical interfaces, it
extremely helpful for you to know the objects provided to you by Sun as
well as the properties of these objects.
The following appendix lists all objects defined in the Java API along
with their superclass, interfaces, methods, and fields when applicable.
There are however, a few details to note:
- Only public or protected classes, methods, and fields are listed
in this appendix. This is because all other classes, methods, and fields
are not accessible outside of the API packages. As a result, they are notreadily
advailable to the Java programmer in developing his own classes and packages.
- If an access modifier is not specified, the method or field is assumed
to be public.
- The constructor methods of every class are the first methods listed
under the "Method" heading. They can easily be identified by
the fact that they have the same name as the class itself.
- All classes, interfaces, exceptions, and errors derive from the java.lang.Object
class. Consequently, for those classes that do not list a superclass, the
superclass is assumed to be java.lang.Object. (Except in the case
of java.lang.Object which has no superclass.)
- Due to the encapsulation with which these packages were designed, almost
all parent objects employed by the following objects are drawn from the
same package. Consequently, unless otherwise noted, the parent object of
the object listed can be found in the same package.
- All exceptions and errors are listed by themselves at the end of the
appendix.
- All exceptions and errors are derived from java.lang.Exception
and java.lang.Error respectively which in turn are derived from
java.lang.Throwable. While powerful objects, most exception and
error classes consist merely of two constructors for the given class -
leaving the rest of their implementation to their superclasses. Consequently,
while these two constructor methods are present in most exception and error
classes, they are only listed in java.lang.Exception and java.lang.Error.
Finally note that this information (as well as explanations of each
field and method) is also available in summarized form at http://www.javasoft.com/JDK-1.0/api/packages.html,
or you can download and peruse the Java source code itself from http://www.javasoft.com/.
java.applet
Although the smallest, this package is the most notable as a result
of the Applet class. Full of useful methods, the Applet
class lays the foundation for all applets and is able to provide you with
information regarding the applet's surroundings via the AppletContext
interface.
Classes
Applet extends java.awt.Panel
Methods
- void destroy()
- AppletContext getAppletContext()
- String getAppletInfo()
- AudioClip getAudioClip(URL url, String name)
- AudioClip getAudioClip(URL url)
- URL getCodeBase()
- URL getDocumentBase()
- Image getImage(URL url, String name)
- Image getImage(URL url)
- String getParameter(String name)
- String[][] getParameterInfo()
- void init()
- boolean isActive()
- void play(URL url, String name)
- void play(URL url)
- void resize(Dimension d)
- void resize(int width, int height)
- void setStub(AppletStub stub)
- void showStatus(String msg)
- void start()
- void stop()
Interfaces
AppletContext
Methods
- Applet getApplet(String name)
- Enumeration getApplets()
- AudioClip getAudioClip(URL url)
- Image getImage(URL url )
- void showDocument(URL url, String target)
- void showDocument(URL url)
- void showStatus(String status)
AppletStub
Methods
- void appletResize(int width, int height)
- AppletContext getAppletContext()
- URL getCodeBase()
- URL getDocumentBase()
- String getParameter(String name)
- boolean isActive()
AudioClip
Methods
- void loop()
- void play()
- void stop()
java.awt
The Java Abstract Window Toolkit (AWT) consists of resources to enable
you to create rich, attractive, and useful interfaces in your applets.
The AWT not only contains managerial classes such as GridBagLayout,
but also has sever concrete interactive tools such as Button and
TextField. More important, however, is the Graphics class
which provides you with a wealth of graphical abilities, including the
ability to draw shapes and display images.
Classes
BorderLayout implements LayoutManager
Methods
- BorderLayout()
- BorderLayout(int hgap, int vgap)
- void addLayoutComponent(String name, Component comp)
- void layoutContainer(Container target)
- Dimension minimumLayoutSize(Container target)
- Dimension preferredLayoutSize(Container target)
- void removeLayoutComponent(Component comp)
- String toString()
Button extends Component
Methods
- Button()
- Button(String label)
- synchronized void addNotify()
- String getLabel()
- protected String paramString()
- void setLabel(String label)
Canvas extends Component
Methods
- Canvas()
- synchronized void addNotify()
- void paint(Graphics g)
CardLayout implements LayoutManager
Methods
- CardLayout()
- CardLayout(int hgap, int vgap)
- void addLayoutComponent(String name, Component comp)
- void first(Container parent)
- void last(Container parent)
- void layoutContainer(Container parent)
- Dimension minimumLayoutSize(Container parent)
- void next(Container parent)
- Dimension preferredLayoutSize(Container parent)
- void previous(Container parent)
- void removeLayoutComponent(Component comp)
- void show(Container parent, String name)
- String toString()
Checkbox extends Component
Methods
- Checkbox()
- Checkbox(String label)
- Checkbox(String label, CheckboxGroup group, boolean state)
- synchronized void addNotify()
- CheckboxGroup getCheckboxGroup()
- String getLabel()
- boolean getState()
- protected String paramString()
- void setCheckboxGroup(CheckboxGroup g)
- void setLabel(String label)
- void setState(boolean state)
CheckboxGroup
Methods
- CheckboxGroup()
- Checkbox getCurrent()
- synchronized void setCurrent(Checkbox box)
- String toString()
CheckboxMenuItem extends MenuItem
Methods
- CheckboxMenuItem(String label)
- synchronized void addNotify()
- boolean getState()
- String paramString()
- void setState(boolean state)
Choice extends Component
Methods
- Choice()
- synchronized void addItem(String item)
- synchronized void addNotify()
- int countItems()
- String getItem(int index)
- int getSelectedIndex()
- String getSelectedItem()
- protected String paramString()
- void select(String str)
- synchronized void select(int pos)
final Color
Fields
- final black
- final blue
- final cyan
- final darkGray
- final gray
- final green
- final lightGray
- final magenta
- final orange
- final pink
- final red
- final white
- final yellow
Methods
- Color(int rgb)
- Color(float red_value, float green_value,
- float blue_value)
- Color(int red_value, int green_value, int blue_value)
- Color brighter()
- Color darker()
- boolean equals(Object obj)
- int getBlue()
- static Color getColor(String nm, int v)
- static Color getColor(String nm, Color v)
- static Color getColor(String nm)
- int getGreen()
- static Color getHSBColor(float hue, float saturation,
- float brightness)
- int getRed()
- int getRGB()
- int hashCode()
- static int HSBtoRGB(float hue, float saturation,
- float brightness)
- static float[] RGBtoHSB(int red, int green, int blue,
- float hsbvals[])
- String toString()
abstract Component implements ImageObserver
Methods
- boolean action(Event evt, Object what)
- void addNotify()
- Rectangle bounds()
- int checkImage(Image image, int width, int height, ImageObserver
observer)
- int checkImage(Image image, ImageObserver observer)
- Image createImage(int width, int height)
- Image createImage(ImageProducer producer)
- void deliverEvent(Event e)
- synchronized void disable()
- void enable(boolean cond)
- synchronized void enable()
- boolean gotFocus(Event evt, Object what)
- boolean handleEvent(Event evt)
- synchronized boolean inside(int x, int y)
- boolean keyDown(Event evt, int key)
- boolean keyUp(Event evt, int key)
- void list(PrintStream out, int indent)
- void list(PrintStream out)
- void list()
- Component locate(int x, int y)
- boolean lostFocus(Event evt, Object what)
- boolean mouseDown(Event evt, int x, int y)
- boolean mouseDrag(Event evt, int x, int y)
- boolean mouseEnter(Event evt, int x, int y)
- boolean mouseExit(Event evt, int x, int y)
- boolean mouseMove(Event evt, int x, int y)
- boolean mouseUp(Event evt, int x, int y)
- Color getBackground()
- synchronized ColorModel getColorModel()
- Font getFont()
- FontMetrics getFontMetrics(Font font)
- Color getForeground()
- Graphics getGraphics()
- Container getParent()
- ComponentPeer getPeer()
- Toolkit getToolkit()
- synchronized void hide()
- boolean imageUpdate(Image img, int flags, int x, int y, int
width, int height)
- void invalidate()
- boolean isEnabled()
- boolean isShowing()
- boolean isValid()
- boolean isVisible()
- void layout()
- Point location()
- Dimension minimumSize()
- void move(int x, int y)
- void nextFocus()
- void paint(Graphics g)
- void paintAll(Graphics g)
- protected String paramString()
- boolean postEvent(Event e)
- boolean prepareImage(Image image, int width, int height, ImageObserver
observer)
- Dimension preferredSize()
- boolean prepareImage(Image image, ImageObserver observer)
- void print(Graphics g)
- void printAll(Graphics g)
- void repaint(int x, int y, int width, int height)
- void repaint(long tm, int x, int y, int width,
- void repaint(long tm)
- void repaint()
- synchronized void removeNotify()
- void requestFocus()
- synchronized void reshape(int x, int y, int width,
- int height)
- void resize(Dimension d)
- void resize(int width, int height)
- synchronized void setBackground(Color c)
- synchronized void setFont(Font f)
- synchronized void setForeground(Color c)
- void show(boolean cond)
- synchronized void show()
- Dimension size()
- String toString()
- void update(Graphics g)
- void validate()
Container extends Component
Methods
- Container()
- synchronized Component add(String name, Component comp)
- synchronized Component add(Component comp, int pos)
- Component add(Component comp)
- synchronized void addNotify()
- int countComponents()
- void deliverEvent(Event e)
- synchronized Component getComponent(int num) throws ArrayIndexOutOfBoundsException
- synchronized Component[] getComponents()
- LayoutManager getLayout()
- synchronized void layout()
- void list(PrintStream out, int indent)
- Component locate(int x, int y)
- synchronized Dimension minimumSize()
- void paintComponents(Graphics g)
- protected String paramString()
- synchronized Dimension preferredSize()
- void printComponents(Graphics g)
- synchronized void remove(Component comp)
- synchronized void removeNotify()
- void setLayout(LayoutManager mgr)
- synchronized void validate()
Dialog extends Window
Methods
- Dialog(Frame parent, String title, boolean modal)
- Dialog(Frame parent, boolean modal)
- synchronized void addNotify()
- boolean isModal()
- boolean isResizable()
- protected String paramString()
- void setTitle(String title)
Dimension
Fields
Methods
- Dimension()
- Dimension(Dimension d)
- Dimension(int width, int height)
- String toString()
Event
Fields
- final static int ACTION_EVENT
- final static int ALT_MASK
- Object arg
- int clickCount
- final static int CTRL_MASK
- final static int DOWN
- Event evt
- final static int F1
- final static int F2
- final static int F3
- final static int F4
- final static int F5
- final static int F6
- final static int F7
- final static int F8
- final static int F9
- final static int F10
- final static int F11
- final static int F12
- final static int GOT_FOCUS
- final static int HOME
- int id
- int key
- final static int KEY_ACTION
- final static int KEY_ACTION_RELEASE
- final static int KEY_PRESS
- final static int KEY_RELEASE
- final static int LEFT
- final static int LIST_DESELECT
- final static int LIST_SELECT
- final static int LOAD_FILE
- final static int LOST_FOCUS
- final static int META_MASK
- int modifiers
- final static int MOUSE_DOWN
- final static int MOUSE_DRAG
- final static int MOUSE_ENTER
- final static int MOUSE_EXIT
- final static int MOUSE_MOVE
- final static int MOUSE_UP
- final static int PGDN
- final static int PGUP
- final static int RIGHT
- final static int SAVE_FILE
- final static int SCROLL_ABSOLUTE
- final static int SCROLL_LINE_DOWN
- final static int SCROLL_LINE_UP
- final static int SCROLL_PAGE_DOWN
- final static int SCROLL_PAGE_UP
- final static int SHIFT_MASK
- Object target
- final static int UP
- long when
- final static int WINDOW_DEICONIFY
- final static int WINDOW_DESTROY
- final static int WINDOW_EXPOSE
- final static int WINDOW_ICONIFY
- final static int WINDOW_MOVED
- int x
- int y
Methods
- Event(Object target, int id, Object arg)
- Event(Object target, long when, int id, int x, int y,
- int key, int modifiers)
- Event(Object target, long when, int id, int x, int y,
- int key, int modifiers, Object arg)
- boolean controlDown()
- boolean metaDown()
- protected String paramString()
- boolean shiftDown()
- String toString()
- void translate(int x, int y)
FileDialog extends Dialog
Fields
- final static LOAD
- final static SAVE
Methods
- FileDialog(Frame parent, String title, int mode)
- FileDialog(Frame parent, String title)
- synchronized void addNotify()
- String getDirectory()
- String getFile()
- FilenameFilter getFilenameFilter()
- int getMode()
- protected String paramString()
- void setDirectory(String dir)
- void setFile(String file)
FlowLayout implements LayoutManager
Fields:
- final static int CENTER
- final static int LEFT
- final static int RIGHT
Methods
- FlowLayout()
- FlowLayout(int align)
- FlowLayout(int align, int hgap, int vgap)
- void addLayoutComponent(String name, Component comp)
- void layoutContainer(Container target)
- Dimension minimumLayoutSize(Container target)
- Dimension preferredLayoutSize(Container target)
- void removeLayoutComponent(Component comp)
- String toString()
Font
Fields
- final static int BOLD
- final static int ITALIC
- protected String name
- final static int PLAIN
- protected int size
- protected int style
Methods
- Font(String name, int style, int size)
- boolean equals(Object obj)
- String getFamily()
- static Font getFont(String nm)
- static Font getFont(String nm, Font font)
- String getName()
- int getSize()
- int getStyle()
- int hashCode()
- boolean isBold()
- boolean isItalic()
- boolean isPlain()
- String toString()
FontMetrics
Fields
Methods
- protected FontMetrics(Font font)
- int bytesWidth(byte data[], int offset, int len)
- int charsWidth(char data[], int offset, int len)
- int charWidth(char ch)
- int charWidth(int ch)
- int getAscent()
- int getDescent()
- Font getFont()
- int getHeight()
- int getMaxAdvance()
- int getMaxAscent()
- int getMaxDecent()
- int getMaxDescent()
- int[] getWidths()
- int stringWidth(String str)
- String toString()
Frame extends Window implements MenuContainer
Fields
- final static int CROSSHAIR_CURSOR
- final static int DEFAULT_CURSOR
- final static int E_RESIZE_CURSOR
- final static int HAND_CURSOR
- final static int MOVE_CURSOR
- final static int NE_RESIZE_CURSOR
- final static int NW_RESIZE_CURSOR
- final static int N_RESIZE_CURSOR
- final static int SE_RESIZE_CURSOR
- final static int SW_RESIZE_CURSOR
- final static int S_RESIZE_CURSOR
- final static int TEXT_CURSOR
- final static int WAIT_CURSOR
- final static int W_RESIZE_CURSOR
Methods
- Frame()
- Frame(String title)
- synchronized void addNotify()
- synchronized void dispose()
- int getCursorType()
- Image getIconImage()
- MenuBar getMenuBar()
- String getTitle()
- boolean isResizable()
- protected String paramString()
- synchronized void remove(MenuComponent m)
- void setCursor(int cursorType)
- void setIconImage(Image image)
- synchronized void setMenuBar(MenuBar mb)
- void setResizable(boolean resizable)
- void setTitle(String title)
abstract Graphics
Methods
- protected Graphics()
- abstract void clearRect(int x, int y, int width, int
height)
- abstract void clipRect(int x, int y, int width, int height)
- abstract void copyArea(int x, int y, int width,
- Graphics create(int x, int y, int width, int height)
- abstract Graphics create()
- void draw3DRect(int x, int y, int width, int height, boolean
raised)
- abstract void drawArc(int x, int y, int width, int height,
int startAngle, int arcAngle)
- abstract void drawLine(int x1, int y1, int x2, int y2)
- abstract void drawOval(int x, int y, int width, int height)
- void drawRect(int x, int y, int width, int height)
- abstract void drawRoundRect(int x, int y, int width,
int height, int arcWidth, int arcHeight)
- void fill3DRect(int x, int y, int width, int height, boolean
raised)
- abstract void fillOval(int x, int y, int width, int height)
- abstract void fillRect(int x, int y, int width, int height)
- abstract void fillRoundRect(int x, int y, int width,
int height, int arcWidth, int arcHeight)
- abstract void dispose()
- void drawBytes(byte data[], int offset, int length, int x, int
y)
- void drawChars(char data[], int offset, int length, int x, int
y)
- abstract boolean drawImage(Image img, int x, int y, int
width, int height, Color bgcolor, ImageObserver observer)
- abstract boolean drawImage(Image img, int x, int y, Color
bgcolor, ImageObserver observer)
- abstract boolean drawImage(Image img, int x, int y, int
width, int height, ImageObserver observer)
- abstract boolean drawImage(Image img, int x, int y, ImageObserver
observer)
- void drawPolygon(Polygon p)
- abstract void drawPolygon(int xPoints[], int yPoints[],
int nPoints)
- abstract void drawString(String str, int x, int y)
- abstract void fillArc(int x, int y, int width, int height,
int startAngle,int arcAngle)
- void fillPolygon(Polygon p)
- abstract void fillPolygon(int xPoints[], int yPoints[],
int nPoints)
- void finalize()
- abstract Rectangle getClipRect()
- abstract Color getColor()
- abstract Font getFont()
- abstract FontMetrics getFontMetrics(Font f)
- FontMetrics getFontMetrics()
- abstract void setColor(Color c)
- abstract void setFont(Font font)
- abstract void setPaintMode()
- abstract void setXORMode(Color c1)
- abstract void translate(int x, int y)
- String toString()
GridBagConstraints implements Cloneable
Fields
- int anchor
- final static int BOTH
- final static int CENTER
- final static int EAST
- int fill
- int gridheight
- int gridwidth
- int gridx
- int gridy
- final static int HORIZONTAL
- Insets insets
- int ipadx
- int ipady
- final static int NONE
- final static int NORTH
- final static int NORTHEAST
- final static int NORTHWEST
- final static int RELATIVE
- final static int REMAINDER
- final static int SOUTH
- final static int SOUTHEAST
- final static int SOUTHWEST
- final static int VERTICAL
- double weightx
- double weighty
- final static int WEST
Methods
- GridBagConstraints()
- Object clone()
GridBagLayout implements LayoutManager
Fields
- double columnWeights[]
- int columnWidths[]
- protected Hashtable comptable
- protected GridBagConstraints defaultConstraints
- protected GridBagLayoutInfo layoutInfo
- protected final static int MAXGRIDSIZE
- protected final static int MINSIZE
- protected final static int PREFERREDSIZE
- int rowHeights[]
- double rowWeights[]
Methods
- GridBagLayout()
- void addLayoutComponent(String name, Component comp)
- protected void AdjustForGravity(GridBagConstraints constraints,
Rectangle r)
- protected void ArrangeGrid(Container parent)
- protected void DumpConstraints(GridBagConstraints constraints)
- protected void DumpLayoutInfo(GridBagLayoutInfo s)
- GridBagConstraints getConstraints(Component comp)
- int[][] getLayoutDimensions()
- protected GridBagLayoutInfo GetLayoutInfo(Container parent,
int sizeflag)
- Point getLayoutOrigin()
- double[][] getLayoutWeights()
- protected Dimension GetMinSize(Container parent, GridBagLayoutInfo
info)
- void layoutContainer(Container parent)
- Point location(int x, int y)
- protected GridBagConstraints lookupConstraints(Component
comp)
- Dimension minimumLayoutSize(Container parent)
- Dimension preferredLayoutSize(Container parent)
- void removeLayoutComponent(Component comp)
- void setConstraints(Component comp, GridBagConstraints constraints)
- String toString()
GridLayout implements LayoutManager
Methods
- GridLayout(int rows, int cols)
- GridLayout(int rows, int cols, int hgap, int vgap)
- void addLayoutComponent(String name, Component comp)
- void layoutContainer(Container parent)
- Dimension minimumLayoutSize(Container parent)
- Dimension preferredLayoutSize(Container parent)
- void removeLayoutComponent(Component comp)
- String toString()
abstract Image
Fields
- final static Object UndefinedProperty
Methods
- Image()
- abstract Graphics getGraphics()
- abstract int getHeight(ImageObserver observer)
- abstract Object getProperty(String name,
- abstract void flush()
- abstract ImageProducer getSource()
- abstract int getWidth(ImageObserver observer)
Insets implements Cloneable
Fields
- int bottom
- int left
- int right
- int top
Methods
- Insets(int top, int left, int bottom, int right)
- Object clone()
- String toString()
Label extends Component
Fields
- final static int CENTER
- final static int RIGHT
Methods
- Label()
- Label(String label)
- Label(String label, int alignment)
- synchronized void addNotify()
- int getAlignment()
- String getText()
- protected String paramString()
- void setAlignment(int alignment)
- void setText(String label)
List extends Component
Methods
- List()
- List(int rows, boolean multipleSelections)
- synchronized void addItem(String item, int index)
- synchronized void addItem(String item)
- synchronized void addNotify()
- int countItems()
- String getItem(int index)
- synchronized void removeNotify()
- synchronized void replaceItem(String newValue, int index)
- boolean allowsMultipleSelections()
- synchronized void clear()
- synchronized void delItem(int position)
- synchronized void delItems(int start, int end)
- synchronized void deselect(int index)
- int getRows()
- synchronized int getSelectedIndex()
- synchronized int[] getSelectedIndexes()
- synchronized String getSelectedItem()
- synchronized String[] getSelectedItems()
- int getVisibleIndex()
- synchronized boolean isSelected(int index)
- void makeVisible(int index)
- Dimension minimumSize()
- Dimension minimumSize(int rows)
- protected String paramString()
- Dimension preferredSize()
- Dimension preferredSize(int rows)
- synchronized void select(int index)
- void setMultipleSelections(boolean v)
MediaTracker
Fields
- final static int ABORTED
- final static int COMPLETE
- final static int ERRORED
Methods
- MediaTracker(Component comp)
- synchronized void addImage(Image image, int id, int width,
int height)
- void addImage(Image image, int id)
- synchronized boolean checkAll(boolean load)
- boolean checkAll()
- synchronized boolean checkID(int id, boolean load)
- boolean checkID(int id)
- synchronized Object[] getErrorsAny()
- synchronized Object[] getErrorsID(int id)
- synchronized boolean isErrorAny()
- synchronized boolean isErrorID(int id)
- int statusAll(boolean load)
- int statusID(int id, boolean load)
- synchronized boolean waitForAll(long ms) throws InterruptedException
- void waitForAll() throws InterruptedException
- synchronized boolean waitForID(int id, long ms) throws
InterruptedException
- void waitForID(int id) throws InterruptedException
Menu extends MenuItem implements MenuContainer
Methods
- Menu(String label)
- Menu(String label, boolean tearOff)
- void add(String label)
- synchronized MenuItem add(MenuItem mi)
- synchronized void addNotify()
- void addSeparator()
- int countItems()
- MenuItem getItem(int index)
- boolean isTearOff()
- synchronized void remove(MenuComponent item)
- synchronized void remove(int index)
- synchronized void removeNotify()
MenuBar extends MenuComponent implements MenuContainer
Methods
- MenuBar()
- synchronized Menu add(Menu m)
- synchronized void addNotify()
- int countMenus()
- Menu getHelpMenu()
- Menu getMenu(int i)
- synchronized void remove(MenuComponent m)
- synchronized void remove(int index)
- void removeNotify()
- synchronized void setHelpMenu(Menu m)
MenuComponent
Methods
- MenuComponent()
- MenuContainer getParent()
- MenuComponentPeer getPeer()
- Font getFont()
- protected String paramString()
- boolean postEvent(Event evt)
- void removeNotify()
- void setFont(Font f)
- String toString()
MenuItem extends MenuComponent
Methods
- MenuItem(String label)
- synchronized void addNotify()
- void disable()
- void enable(boolean cond)
- void enable()
- String getLabel()
- boolean isEnabled()
- String paramString()
- void setLabel(String label)
Panel extends Container
Methods
- Panel()
- synchronized void addNotify()
Point
Fields
Methods
- Point (int x, int y)
- boolean equals(Object obj)
- int hashCode()
- void move(int x, int y)
- String toString()
- void translate(int x, int y)
Polygon
Fields
- int npoints
- int xpoints[]
- int ypoints[]
Methods
- Polygon()
- Polygon(int xpoints[], int ypoints[], int npoints)
- void addPoint(int x, int y)
- Rectangle getBoundingBox()
- boolean inside(int x, int y)
Rectangle
Fields
- int height
- int width
- int x
- int y
Methods
- Rectangle()
- Rectangle(Dimension d)
- Rectangle(int x, int y, int width, int height)
- Rectangle(int width, int height)
- Rectangle(Point p)
- Rectangle(Point p, Dimension d)
- void add(Rectangle r)
- void add(Point pt)
- void add(int newx, int newy)
- boolean equals(Object obj)
- void grow(int h, int v)
- int hashCode()
- boolean inside(int x, int y)
- Rectangle intersection(Rectangle r)
- boolean intersects(Rectangle r)
- boolean isEmpty()
- void move(int x, int y)
- void reshape(int x, int y, int width, int height)
- void resize(int width, int height)
- String toString()
- void translate(int x, int y)
- Rectangle union(Rectangle r)
Scrollbar extends Component
Fields
- final static int HORIZONTAL
- final static int VERTICAL
Methods
- Scrollbar()
- Scrollbar(int orientation)
- Scrollbar(int orientation, int value, int visible, int minimum,
int maximum)
- synchronized void addNotify()
- int getLineIncrement()
- int getMaximum()
- int getMinimum()
- int getOrientation()
- int getPageIncrement()
- int getValue()
- int getVisible()
- protected String paramString()
- void setLineIncrement(int l)
- void setPageIncrement(int l)
- void setValue(int value)
- void setValues(int value, int visible, int minimum, int maximum)
TextArea extends TextComponent
Methods
- TextArea()
- TextArea(int rows, int cols)
- TextArea(String text)
- TextArea(String text, int rows, int cols)
- synchronized void addNotify()
- void appendText(String str)
- int getColumns()
- int getRows()
- void insertText(String str, int pos)
- Dimension minimumSize()
- Dimension minimumSize(int rows, int cols)
- protected String paramString()
- Dimension preferredSize()
- Dimension preferredSize(int rows, int cols)
- void replaceText(String str, int start, int end)
TextComponent extends Component
Methods
- String getSelectedText()
- int getSelectionEnd()
- int getSelectionStart()
- boolean isEditable()
- protected String paramString()
- void select(int selStart, int selEnd)
- void selectAll()
- void setEditable(boolean t)
TextField extends TextComponent
Methods
- TextField()
- TextField(int cols)
- TextField(String text)
- TextField(String text, int cols)
- synchronized void addNotify()
- boolean echoCharIsSet()
- int getColumns()
- char getEchoChar()
- Dimension minimumSize()
- Dimension minimumSize(int cols)
- protected String paramString()
- Dimension preferredSize()
- Dimension preferredSize(int cols)
- void setEchoCharacter(char c)
Toolkit
Methods
- Toolkit()
- protected abstract ButtonPeer createButton(Button
target)
- protected abstract CanvasPeer createCanvas(Canvas
target)
- abstract int checkImage(Image image, int width, int height,
ImageObserver observer)
- abstract CheckboxPeer createCheckbox(Checkbox target)
- abstract Image createImage(ImageProducer producer)
- protected abstract CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem
target)
- protected abstract ChoicePeer createChoice(Choice
target)
- protected abstract LabelPeer createLabel(Label
target)
- protected abstract ListPeer createList(List target)
- protected abstract MenuPeer createMenu(Menu target)
- protected abstract MenuBarPeer createMenuBar(MenuBar
target)
- protected abstract MenuItemPeer createMenuItem(MenuItem
target)
- protected abstract PanelPeer createPanel(Panel
target)
- abstract boolean prepareImage(Image image, int width,
int height,ImageObserver observer)
- protected abstract ScrollbarPeer createScrollbar(Scrollbar
target)
- protected abstract TextAreaPeer createTextArea(TextArea
target)
- protected abstract TextFieldPeer createTextField(TextField
target)
- protected abstract WindowPeer createWindow(Window
target)
- protected abstract DialogPeer createDialog(Dialog
target)
- protected abstract FileDialogPeer createFileDialog(FileDialog
target)
- protected abstract FramePeer createFrame(Frame
target)
- abstract ColorModel getColorModel()
- static synchronized Toolkit getDefaultToolkit()
- abstract String[] getFontList()
- abstract FontMetrics getFontMetrics(Font font)
- abstract Image getImage(URL url)
- abstract Image getImage(String filename)
- abstract int getScreenResolution()
- abstract Dimension getScreenSize()
- abstract void sync()
Window extends Container
Methods
- Window(Frame parent)
- synchronized void addNotify()
- synchronized void dispose()
- Toolkit getToolkit()
- final String getWarningString()
- synchronized void pack()
- synchronized void show()
- void toBack()
- void toFront()
Interfaces
LayoutManager
- void addLayoutComponent(String name, Component comp)
- void layoutContainer(Container parent)
- Dimension minimumLayoutSize(Container parent)
- Dimension preferredLayoutSize(Container parent)
- void removeLayoutComponent(Component comp)
MenuContainer
Methods
- Font getFont()
- boolean postEvent(Event evt)
- void remove(MenuComponent comp)
java.awt.image
Closely related to the java.awt package, this package consists of tools
designed to handle and manipulate images coming across a network. Because
all classes and interfaces in this package are closely related, you will
see that many of the methods appear multiple times.
Classes
abstract ColorModel
Fields
Methods
- ColorModel(int bits)
- abstract int getAlpha(int pixel)
- abstract int getBlue(int pixel)
- abstract int getGreen(int pixel)
- int getPixelSize()
- abstract int getRed(int pixel)
- int getRGB(int pixel)
- static ColorModel getRGBdefault()
CropImageFilter extends ImageFilter
Methods
- CropImageFilter(int x, int y, int w, int h)
- void setDimensions(int width, int height)
- void setPixels(int x, int y, int w, int h, ColorModel model,
int pixels[], int offset, int scansize)
- void setPixels(int x, int y, int w, int h, ColorModel model,
byte pixels[], int offset, int scansize)
- void setProperties(Hashtable props)
DirectColorModel extends ColorModel
Methods
- DirectColorModel(int bits, int rmask, int gmask, int bmask)
- DirectColorModel(int bits, int rmask, int gmask, int bmask,
int amask)
- final int getAlpha(int pixel)
- final int getAlphaMask()
- final int getBlue(int pixel)
- final int getBlueMask()
- final int getGreen(int pixel)
- final int getGreenMask()
- final int getRed(int pixel)
- final int getRedMask()
- final int getRGB(int pixel)
FilteredImageSource extends Object implements ImageProducer
Methods
- FilteredImageSource(ImageProducer orig, ImageFilter imgf)
- synchronized void addConsumer(ImageConsumer ic)
- synchronized boolean isConsumer(ImageConsumer ic)
- void startProduction(ImageConsumer ic)
- synchronized void removeConsumer(ImageConsumer ic)
- void requestTopDownLeftRightResend(ImageConsumer ic)
ImageFilter implements ImageConsumer, Cloneable
Fields
- protected ImageConsumer consumer
Methods
- ImageFilter()
- Object clone()
- ImageFilter getFilterInstance(ImageConsumer ic)
- void imageComplete(int status)
- void resendTopDownLeftRight(ImageProducer ip)
- void setColorModel(ColorModel model)
- void setDimensions(int width, int height)
- void setHints(int hints)
- void setPixels(int x, int y, int width, int height, ColorModel
model, int pixels[], int offset, int scansize)
- void setPixels(int x, int y, int w, int h, ColorModel model,
byte pixels[], int offset, int scansize)
- void setProperties(Hashtable props)
IndexColorModel extends ColorModel
Methods
- IndexColorModel(int bits, int size, byte r[], byte g[], byte
b[])
- IndexColorModel(int bits, int size, byte r[], byte g[], byte
b[], int trans)
- IndexColorModel(int bits, int size, byte r[], byte g[], byte
b[], byte a[])
- final int getAlpha(int pixel)
- final void getAlphas(byte a[])
- final int getBlue(int pixel)
- final void getBlues(byte b[])
- final int getGreen(int pixel)
- final void getGreens(byte g[])
- final int getMapSize()
- final int getRed(int pixel)
- final void getReds(byte r[])
- final int getRGB(int pixel)
- final int getTransparentPixel()
MemoryImageSource implements ImageProducer
Methods
- MemoryImageSource(int w, int h, ColorModel cm, byte pix[], int
offset, int scan)
- MemoryImageSource(int w, int h, ColorModel cm, byte pix[], int
offset, int scan, Hashtable props)
- MemoryImageSource(int w, int h, ColorModel cm, int pix[], int
offset, int scan)
- MemoryImageSource(int w, int h, ColorModel cm, int pix[], int
offset, int scan, Hashtable props)
- MemoryImageSource(int w, int h, int pix[], int offset, int scan)
- MemoryImageSource(int w, int h, int pix[], int offset, int scan,
Hashtable props)
- synchronized void addConsumer(ImageConsumer ic)
- synchronized boolean isConsumer(ImageConsumer ic)
- void startProduction(ImageConsumer ic)
- synchronized void removeConsumer(ImageConsumer ic)
- void requestTopDownLeftRightResend(ImageConsumer ic)
PixelGrabber implements ImageConsumer
Methods
- PixelGrabber(Image img, int x, int y, int w, int h, int pix[],
int offset, int scansize)
- PixelGrabber(ImageProducer ip, int x, int y, int w, int h, int
pix[], int offset, int scansize)
- synchronized boolean grabPixels(long ms) throws InterruptedException
- boolean grabPixels() throws InterruptedException
- void setColorModel(ColorModel model)
- void setDimensions(int width, int height)
- void setHints(int hints)
- void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel
model, byte pixels[], int srcOff, int srcScan)
- void setProperties(Hashtable props)
- synchronized int status()
- void setPixels(int srcX, int srcY, int srcW, int srcH, ColorModel
model, int pixels[], int srcOff, int srcScan)
- synchronized void imageComplete(int status)
RGBImageFilter extends ImageFilter
Fields
- protected boolean canFilterIndexColorModel
- protected ColorModel newmodel
- protected ColorModel origmodel
Methods
- RGBImageFilter()
- IndexColorModel filterIndexColorModel(IndexColorModel icm)
- void filterRGBPixels(int x, int y, int w, int h, int pixels[],
int offset, int scansize)
- void setColorModel(ColorModel model)
- void substituteColorModel(ColorModel oldcm, ColorModel newcm)
- void setPixels(int x, int y, int width, int height, ColorModel
model, int pixels[], int offset, int scansize)
- void setPixels(int x, int y, int width, int height, ColorModel
model, byte pixels[], int offset, int scansize)
- abstract int filterRGB(int x, int y, int rgb)
java.awt.peer
The interfaces outlined in this package serve as intermediaries between
your code and the computer on which your code is running. While it is beneficial
to understand what the peers do, you probably will have no need to work
directly with this package.
Interfaces
ButtonPeer extends ComponentPeer
Methods
- abstract void setLabel(String label)
CanvasPeer extends ComponentPeer
CheckboxMenuItemPeer extends MenuItemPeer
Methods
- abstract void setState(boolean t)
CheckboxPeer extends ComponentPeer
- abstract void setCheckboxGroup(CheckboxGroup g)
- abstract void setLabel(String label)
- abstract void setState(boolean state)
ChoicePeer extends ComponentPeer
- abstract void addItem(String item, int index)
- abstract void select(int index)
ComponentPeer
Methods
- abstract int checkImage(Image img, int w, int h, ImageObserver
o)
- abstract Image createImage(int width, mint height)
- abstract Image createImage(ImageProducer producer)
- abstract void disable()
- abstract void dispose()
- abstract void enable()
- abstract ColorModel getColorModel()
- abstract FontMetrics getFontMetrics(Font font)
- abstract Graphics getGraphics()
- abstract Toolkit getToolkit()
- abstract boolean handleEvent(Event e)
- abstract void hide()
- abstract Dimension minimumSize()
- abstract void nextFocus()
- abstract void paint(Graphics g)
- abstract Dimension preferredSize()
- abstract boolean prepareImage(Image img, int w, int h,
ImageObserver o)
- abstract void print(Graphics g)
- abstract void repaint(long tm, int x, int y, int width,
int height)
- abstract void requestFocus()
- abstract void reshape(int x, int y, int width, int height)
- abstract void setBackground(Color c)
- abstract void setFont(Font f)
- abstract void setForeground(Color c)
- abstract void show()
ContainerPeer extends ComponentPeer
Methods
DialogPeer extends WindowPeer
Methods
- abstract void setResizable(boolean resizeable)
- abstract void setTitle(String title)
FileDialogPeer extends DialogPeer
- abstract void setDirectory(String dir)
- abstract void setFile(String file)
- abstract void setFilenameFilter(FilenameFilter filter)
FramePeer extends WindowPeer
- abstract void setCursor(int cursorType)
- abstract void setIconImage(Image im)
- abstract void setMenuBar(MenuBar mb)
- abstract void setResizable(boolean resizeable)
- abstract void setTitle(String title)
LabelPeer extends ComponentPeer
Methods
- abstract void setAlignment(int alignment)
- abstract void setText(String label)
ListPeer extends ComponentPeer
Methods
- abstract void addItem(String item, int index)
- abstract void clear()
- abstract void delItems(int start, int end)
- abstract void deselect(int index)
- abstract int[] getSelectedIndexes()
- abstract void makeVisible(int index)
- abstract Dimension minimumSize(int v)
- abstract Dimension preferredSize(int v)
- abstract void select(int index)
- abstract void setMultipleSelections(boolean v)
MenuBarPeer extends MenuComponentPeer
Methods
- abstract void addHelpMenu(Menu m)
- abstract void addMenu(Menu m)
- abstract void delMenu(int index)
MenuComponentPeer
Methods
MenuItemPeer extends MenuComponentPeer
- abstract void disable()
- abstract void enable()
- abstract void setLabel(String label)
MenuPeer extends MenuItemPeer
- abstract void addItem(MenuItem item)
- abstract void addSeparator()
- abstract void delItem(int index)
PanelPeer extends ContainerPeer
ScrollbarPeer extends ComponentPeer
Methods
- abstract void setLineIncrement(int l)
- abstract void setPageIncrement(int l)
- abstract void setValue(int value)
- abstract void setValues(int value, int visible, int minimum,
int maximum)
TextAreaPeer extends TextComponentPeer
- abstract void insertText(String txt, int pos)
- abstract Dimension minimumSize(int rows, int cols)
- abstract Dimension preferredSize(int rows, int cols)
- abstract void replaceText(String txt, int start, int
end)
TextComponentPeer extends ComponentPeer
Methods
- abstract int getSelectionEnd()
- abstract int getSelectionStart()
- abstract String getText()
- abstract void select(int selStart, int selEnd)
- abstract void setEditable(boolean editable)
- abstract void setText(String l)
TextFieldPeer extends TextComponentPeer
Methods
- abstract Dimension minimumSize(int cols)
- abstract Dimension preferredSize(int cols)
- abstract void setEchoCharacter(char c)
WindowPeer extends ContainerPeer
Methods
- abstract void toBack()
- abstract void toFront()
Interfaces
ImageConsumer
Fields
- final static int COMPLETESCANLINES
- final static int IMAGEABORTED
- final static int IMAGEERROR
- final static int RANDOMPIXELORDER
- final static int SINGLEFRAME
- final static int SINGLEFRAMEDONE
- final static int SINGLEPASS
- final static int STATICIMAGEDONE
- final static int TOPDOWNLEFTRIGHT
Methods
- abstract void setColorModel(ColorModel model)
- abstract void setDimensions(int width, int height)
- abstract void setHints(int hintflags)
- abstract void setPixels(int x, int y, int w, int h, ColorModel
model, byte pixels[], int offset, int scansize)
- abstract void setPixels(int x, int y, int w, int h, ColorModel
model, int pixels[], int offset, int scansize)
- abstract void imageComplete(int status)
ImageObserver
Fields
- final static int ABORT
- final static int ALLBITS
- final static int ERROR
- final static int FRAMEBITS
- final static int HEIGHT
- final static int SOMEBITS
- final static int WIDTH
Methods
- abstract boolean imageUpdate(Image img, int infoflags,
int x, int y, int widfinal static int PROPERTIES
ImageProducer
Methods
- abstract void addConsumer(ImageConsumer ic)
- abstract boolean isConsumer(ImageConsumer ic)
- abstract void removeConsumer(ImageConsumer ic)
- abstract void requestTopDownLeftRightResend(ImageConsumer
ic)
- abstract void startProduction(ImageConsumer ic)
java.io
The java.io package serves as the standard input/output library for
the Java language. This package provides you with the ability to create
and handle streams of data in several manners. To this end, it provides
you with types as simple as a String and as complex as a StreamTokenizer.
Furthermore, because this package is heavily dependant the basic InputStream
and OutputStream classes as well as the interfaces, it would be
a wise idea to examine their code details.
Classes
BufferedInputStream extends FilterInputStream
Fields
- protected byte buf[]
- protected int count
- protected int marklimit
- protected int markpos
- protected int pos
Methods
- BufferedInputStream(InputStream in)
- BufferedInputStream(InputStream in, int size)
- synchronized int available() throws IOException
- synchronized void mark(int readlimit)
- boolean markSupported()
- synchronized int read(byte b[], int offset, int len)
throws IOException
- synchronized int read() throws IOException
- synchronized void reset() throws IOException
- synchronized long skip(long num) throws IOException
BufferedOutputStream extends FilterOutputStream
Fields
- protected byte buf[]
- protected int count
Methods
- BufferedOutputStream(OutputStream out)
- BufferedOutputStream(OutputStream out, int size)
- synchronized void flush() throws IOException
- synchronized void write(byte b[], int offset, int len)
throws IOException
- synchronized void write(int b) throws IOException
ByteArrayInputStream extends InputStream
Fields
- protected byte buf[]
- protected int count
- protected int pos
Methods
- ByteArrayInputStream(byte buf[])
- ByteArrayInputStream(byte buf[], int offset, int length)
- synchronized int available()
- synchronized int read(byte b[], int offset, int len)
- synchronized int read()
- synchronized void reset()
- synchronized long skip(long num)
ByteArrayOutputStream extends OutputStream
Fields
- protected byte buf[]
- protected int count
Methods
- ByteArrayOutputStream()
- ByteArrayOutputStream(int size)
- synchronized void reset()
- int size()
- synchronized byte[] toByteArray()
- String toString(int hibyte)
- String toString()
- synchronized void write(int b)
- synchronized void write(byte b[], int offset, int len)
- synchronized void writeTo(OutputStream out) throws IOException
DataInputStream extends FilterInputStream implements DataInput
Methods
- DataInputStream(InputStream in)
- final int read(byte b[], int offset, int len) throws IOException
- final int read(byte b[]) throws IOException
- final boolean readBoolean() throws IOException
- final byte readByte() throws IOException
- final char readChar() throws IOException
- final double readDouble() throws IOException
- final float readFloat() throws IOException
- final void readFully(byte b[], int offset, int len) throws IOException
- final void readFully(byte b[]) throws IOException
- final int readInt() throws IOException
- final String readLine() throws IOException
- final long readLong() throws IOException
- final short readShort() throws IOException
- final int readUnsignedByte() throws IOException
- final int readUnsignedShort() throws IOException
- final static String readUTF(DataInput in) throws IOException
- final String readUTF() throws IOException
- final int skipBytes(int num) throws IOException
DataOutputStream extends FilterOutputStream implements DataOutput
Fields
Methods
- DataOutputStream(OutputStream out)
- void flush() throws IOException
- final int size()
- synchronized void write(byte b[], int offset,int len)
throws IOException
- synchronized void write(int b) throws IOException
- final void writeBoolean(boolean v) throws IOException
- final void writeByte(int v) throws IOException
- final void writeBytes(String s) throws IOException
- final void writeChar(int v) throws IOException
- final void writeChars(String s) throws IOException
- final void writeDouble(double v) throws IOException
- final void writeFloat(float v) throws IOException
- final void writeInt(int v) throws IOException
- final void writeLong(long v) throws IOException
- final void writeShort(int v) throws IOException
- final void writeUTF(String str) throws IOException
File
Fields
- final static String pathSeparator
- final static char pathSeparatorChar
- final static String separator
- final static char separatorChar
Methods
- File(String path)
- File(File dir, String name)
- File(String path, String name)
- boolean canRead()
- boolean canWrite()
- boolean delete()
- boolean equals(Object obj)
- boolean exists()
- String getAbsolutePath()
- String getName()
- String getParent()
- String getPath()
- int hashCode()
- boolean isAbsolute()
- boolean isDirectory()
- boolean isFile()
- long lastModified()
- long length()
- String[] list(FilenameFilter filter)
- String[] list()
- boolean mkdir()
- boolean mkdirs()
- boolean renameTo(File dest)
- String toString()
FileDescriptor
Fields
- final static FileDescriptor err
- final static FileDescriptor in
- final static FileDescriptor out
Methods
- FileDescriptor()
- boolean valid()
FileInputStream extends InputStream
Methods
- FileInputStream(FileDescriptor descriptorObject)
- FileInputStream(File file) throws FileNotFoundException
- FileInputStream(String name) throws FileNotFoundException
- int available() throws IOException
- void close() throws IOException
- protected void finalize() throws IOException
- final FileDescriptor getFD() throws IOException
- int read(byte b[], int offset, int len) throws IOException
- int read(byte b[]) throws IOException
- int read() throws IOException
- long skip(long num) throws IOException
FileOutputStream extends OutputStream
Methods
- FileOutputStream(FileDescriptor fdObj)
- FileOutputStream(File file) throws IOException
- FileOutputStream(String name) throws IOException
- void close() throws IOException
- protected void finalize() throws IOException
- final FileDescriptor getFD() throws IOException
- void write(byte b[], int offset, int len) throws IOException
- void write(byte b[]) throws IOException
- void write(int b) throws IOException
FilterInputStream extends InputStream
Fields
Methods
- FilterInputStream(InputStream in)
- int available() throws IOException
- void close() throws IOException
- synchronized void mark(int readlimit)
- boolean markSupported()
- int read(byte b[], int offset, int len) throws IOException
- int read(byte b[]) throws IOException
- int read() throws IOException
- synchronized void reset() throws IOException
- long skip(long num) throws IOException
FilterOutputStream extends OutputStream
Fields
- protected OutputStream out
Methods
- FilterOutputStream(OutputStream out)
- void close() throws IOException
- void flush() throws IOException
- void write(byte b[], int offset, int len) throws IOException
- void write(byte b[]) throws IOException
- void write(int b) throws IOException
abstract InputStream
Methods
- InputStream()
- int available() throws IOException
- void close() throws IOException
- synchronized void mark(int readlimit)
- boolean markSupported()
- abstract int read() throws IOException
- int read(byte b[], int offset, int len) throws IOException
- int read(byte b[]) throws IOException
- synchronized void reset() throws IOException
- long skip(long num) throws IOException
LineNumberInputStream extends FilterInputStream
Methods
- LineNumberInputStream(InputStream in)
- int available() throws IOException
- int getLineNumber()
- void mark(int readlimit)
- int read(byte b[], int offset, int len) throws IOException
- int read() throws IOException
- void reset() throws IOException
- void setLineNumber(int lineNumber)
- long skip(long num) throws IOException
abstract OutputStream
Methods
- OutputStream()
- void close() throws IOException
- void flush() throws IOException
- void write(byte b[], int offset, int len) throws IOException
- void write(byte b[]) throws IOException
- abstract void write(int b) throws IOException
PipedInputStream extends InputStream
Methods
- PipedInputStream()
- PipedInputStream(PipedOutputStream src) throws IOException
- void close() throws IOException
- void connect(PipedOutputStream src) throws IOException
- synchronized int read(byte b[], int offset, int len)
throws IOException
- synchronized int read() throws IOException
PipedOutputStream extends OutputStream
Methods
- PipedOutputStream()
- PipedOutputStream(PipedInputStream snk) throws IOException
- void close() throws IOException
- void connect(PipedInputStream snk) throws IOException
- void write(byte b[], int offset, int len) throws IOException
- void write(int b) throws IOException
PrintStream extends FilterOutputStream
Methods
- PrintStream(OutputStream out)
- PrintStream(OutputStream out, boolean autoflush)
- boolean checkError()
- void close()
- void flush()
- void print(boolean b)
- void print(double d)
- void print(float f)
- void print(long l)
- void print(int i)
- void print(char c)
- synchronized void print(char s[])
- synchronized void print(String s)
- void print(Object obj)
- synchronized void println(boolean b)
- synchronized void println(double d)
- synchronized void println(float f)
- synchronized void println(long l)
- synchronized void println(int i)
- synchronized void println(char c)
- synchronized void println(char s[])
- synchronized void println(String s)
- synchronized void println(Object obj)
- void println()
- void write(byte b[], int offset, int len)
- void write(int b)
PushbackInputStream extends FilterInputStream
Fields
Methods
- PushbackInputStream(InputStream in)
- int available() throws IOException
- boolean markSupported()
- int read(byte bytes[], int offset, int length) throws IOException
- int read() throws IOException
- void unread(int ch) throws IOException
RandomAccessFile implements DataOutput, DataInput
Methods
- RandomAccessFile(File file, String mode) throws IOException
- RandomAccessFile(String name, String mode) throws IOException
- void close() throws IOException
- final FileDescriptor getFD() throws IOException
- long getFilePointer() throws IOException
- long length() throws IOException
- int read(byte b[]) throws IOException
- int read(byte b[], int offset, int len) throws IOException
- int read() throws IOException
- final boolean readBoolean() throws IOException
- final byte readByte() throws IOException
- final char readChar() throws IOException
- final double readDouble() throws IOException
- final float readFloat() throws IOException
- final void readFully(byte b[], int offset, int len) throws IOException
- final void readFully(byte b[]) throws IOException
- final int readInt() throws IOException
- final String readLine() throws IOException
- final long readLong() throws IOException
- final short readShort() throws IOException
- final int readUnsignedByte() throws IOException
- final int readUnsignedShort() throws IOException
- final String readUTF() throws IOException
- void seek(long pos) throws IOException
- int skipBytes(int num) throws IOException
- void write(byte b[], int offset, int len) throws IOException
- void write(byte b[]) throws IOException
- final void writeBoolean(boolean v) throws IOException
- final void writeByte(int v) throws IOException
- final void writeBytes(String s) throws IOException
- final void writeChar(int v) throws IOException
- final void writeChars(String s) throws IOException
- final void writeDouble(double v) throws IOException
- final void writeFloat(float v) throws IOException
- final void writeInt(int v) throws IOException
- final void writeLong(long v) throws IOException
- final void writeShort(int v) throws IOException
- final void writeUTF(String str) throws IOException
SequenceInputStream extends InputStream
Methods
- SequenceInputStream(InputStream s1, InputStream s2)
- SequenceInputStream(Enumeration e)
- void close() throws IOException
- int read(byte buf[], int pos, int len) throws IOException
- int read() throws IOException
StreamTokenizer
Fields
- double nval
- String sval
- final static int TT_EOF
- final static int TT_EOL
- final static int TT_NUMBER
- final static int TT_WORD
Methods
- StreamTokenizer(InputStream I)
- void commentChar(int ch)
- void eolIsSignificant(boolean flag)
- int lineno()
- void lowerCaseMode(boolean fl)
- int nextToken() throws IOException
- void ordinaryChar(int ch)
- void ordinaryChars(int low, int hi)
- void parseNumbers()
- void pushBack()
- void quoteChar(int ch)
- void resetSyntax()
- void slashSlashComments(boolean flag)
- void slashStarComments(boolean flag)
- String toString()
- void whitespaceChars(int low, int hi)
- void wordChars(int low, int hi)
StringBufferInputStream extends InputStream
Fields
- protected String buffer
- protected int count
- protected int pos
Methods
- StringBufferInputStream(String s)
- synchronized int available()
- synchronized int read(byte b[], int offset, int len)
- synchronized int read()
- synchronized void reset()
- synchronized long skip(long num)
Interfaces
DataInput
Methods
- abstract boolean readBoolean() throws IOException
- abstract byte readByte() throws IOException
- abstract char readChar() throws IOException
- abstract double readDouble() throws IOException
- abstract float readFloat() throws IOException
- abstract void readFully(byte b[], int offset, int len)
throws IOException
- abstract void readFully(byte b[]) throws IOException
- abstract int readInt() throws IOException
- abstract long readLong() throws IOException
- abstract short readShort() throws IOException
- abstract int readUnsignedByte() throws IOException
- abstract int readUnsignedShort() throws IOException
- abstract String readUTF() throws IOException
- abstract int skipBytes(int num) throws IOException
DataOutput
Methods
- abstract void write(byte b[], int offset, int len) throws
IOException
- abstract void write(byte b[]) throws IOException
- abstract void write(int b) throws IOException
- abstract void writeBoolean(boolean v) throws IOException
- abstract void writeByte(int v) throws IOException
- abstract void writeBytes(String s) throws IOException
- abstract void writeChar(int v) throws IOException
- abstract void writeChars(String s) throws IOException
- abstract void writeDouble(double v) throws IOException
- abstract void writeFloat(float v) throws IOException
- abstract void writeInt(int v) throws IOException
- abstract void writeLong(long v) throws IOException
- abstract void writeShort(int v) throws IOException
- abstract void writeUTF(String str) throws IOException
FilenameFilter
Methods
- abstract boolean accept(File dir, String name)
java.lang
These classes are essentially the "heart" of the java language.
It provides you not only with the basic data types, such as Integer
and String, but also means of handling errors through the Throwable
and Error classes. Furthermore, the SecurityManager and
System classes supply you with some degree of control over the
Java Run-Time System.
Classes
Boolean
Fields
- final static Boolean FALSE
- final static char MAX_VALUE
- final static char MIN_VALUE
- final static Boolean TRUE
Methods
- Boolean(String s)
- Boolean(boolean value)
- boolean booleanValue()
- boolean equals(Object obj)
- static boolean getBoolean(String name)
- int hashCode()
- String toString()
- static Boolean valueOf(String s)
Character
Fields
- Character(char value)
- char charValue()
- static int digit(char ch, int radix)
- boolean equals(Object obj)
- static char forDigit(int digit, int radix)
- int hashCode()
- static boolean isDigit(char ch)
- static boolean isLowerCase(char ch)
- static boolean isSpace(char ch)
- static boolean isUpperCase(char ch)
- final static int MAX_RADIX
- final static int MIN_RADIX
- static char toLowerCase(char ch)
- String toString()
- static char toUpperCase(char ch)
Class
Methods
- static Class forName(String className) throws ClassNotFoundException
- ClassLoader getClassLoader()
- Class[] getInterfaces()
- String getName()
- Class getSuperclass()
- boolean isInterface()
- Object newInstance() throws InstantiationException, IllegalAccessException
- String toString()
ClassLoader
- protected ClassLoader()
- abstract Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
- final Class defineClass(byte data[], int offset, int length)
- final Class findSystemClass(String name) throws ClassNotFoundExcept
- final void resolveClass(Class c)
Compiler
Methods
- static Object command(Object any)
- static boolean compileClass(Class clazz)
- static boolean compileClasses(String string)
- static void disable()
- static void enable()
Double extends Number
Fields
- final static double MAX_VALUE
- final static double MIN_VALUE
- final static double NaN
- final static double NEGATIVE_INFINITY
- final static double POSITIVE_INFINITY
Methods
- Double(double value)
- Double(String s) throws NumberFormatException
- static long doubleToLongBits(double value)
- double doubleValue()
- boolean equals(Object obj)
- float floatValue()
- int hashCode()
- int intValue()
- boolean isInfinite()
- static boolean isInfinite(double v)
- boolean isNaN()
- static boolean isNaN(double v)
- static double longBitsToDouble(long bits)
- long longValue()
- String toString()
- static String toString(double d)
- static Double valueOf(String s) throws NumberFormatException
Float extends Number
Fields
- final static float MAX_VALUE
- final static float MIN_VALUE
- final static float NaN
- final static float NEGATIVE_INFINITY
- final static float POSITIVE_INFINITY
Fields
- Float(String s) throws NumberFormatException
- Float(double value)
- Float(float value)
- double doubleValue()
- boolean equals(Object obj)
- static int floatToIntBits(float value)
- float floatValue()
- int hashCode()
- static float intBitsToFloat(int bits)
- int intValue()
- boolean isInfinite()
- static boolean isInfinite(float v)
- boolean isNaN()
- static boolean isNaN(float v)
- long longValue()
- String toString()
- static String toString(float f)
- static Float valueOf(String s) throws NumberFormatException
Integer extends Number
Fields
- final static int MAX_VALUE
- final static int MIN_VALUE
Methods
- Integer(int value)
- Integer(String s) throws NumberFormatException
- double doubleValue()
- boolean equals(Object obj)
- float floatValue()
- static Integer getInteger(String nm, Integer val)
- static Integer getInteger(String nm, int val)
- static Integer getInteger(String nm)
- int hashCode()
- int intValue()
- long longValue()
- static int parseInt(String s) throws NumberFormatException
- static int parseInt(String s, int radix) throws NumberFormatException
- String toString()
- static String toString(int i)
- static String toString(int i, int radix)
- static Integer valueOf(String s) throws NumberFormatException
- static Integer valueOf(String s, int radix) throws NumberFormatException
Long extends Number
Fields
- final static long MAX_VALUE
- final static long MIN_VALUE
Methods
- Long(String s) throws NumberFormatException
- Long(long value)
- double doubleValue()
- boolean equals(Object obj)
- float floatValue()
- static Long getLong(String nm, Long val)
- static Long getLong(String nm, long val)
- static Long getLong(String nm)
- int hashCode()
- int intValue()
- long longValue()
- static long parseLong(String s) throws NumberFormatException
- static long parseLong(String s, int radix) throws NumberFormatException
- String toString()
- static String toString(long i)
- static String toString(long i, int radix)
- static Long valueOf(String s) throws NumberFormatException
- static Long valueOf(String s, int radix) throws NumberFormatException
Math
Fields
- final static double E
- final static double PI
Methods
- static double abs(double a)
- static float abs(float a)
- static long abs(long a)
- static int abs(int a)
- static double acos(double a)
- static double asin(double a)
- static double atan(double a)
- static double atan2(double a, double b)
- static double ceil(double a)
- static double cos(double a)
- static double exp(double a)
- static double floor(double a)
- static double IEEEremainder(double f1, double f2)
- static double log(double a) throws ArithmeticException
- static double max(double a, double b)
- static float max(float a, float b)
- static long max(long a, long b)
- static int max(int a, int b)
- static double min(double a, double b)
- static float min(float a, float b)
- static long min(long a, long b)
- static int min(int a, int b)
- static double pow(double a, double b) throws ArithmeticException
- static synchronized double random()
- static double rint(double a)
- static long round(double a)
- static int round(float a)
- static double sin(double a)
- static double sqrt(double a) throws ArithmeticException
- static double tan(double a)
abstract Number
Methods
- Number()
- abstract double doubleValue()
- abstract float floatValue()
- abstract int intValue()
- abstract long longValue()
Object
Methods
- Object()
- protected Object clone() throws CloneNotSupportedException
- boolean equals(Object obj)
- protected void finalize() throws Throwable
- final Class getClass()
- int hashCode()
- final void notify()
- final void notifyAll()
- String toString()
- final void wait() throws InterruptedException
- final void wait(long timeout, int nanos) throws InterruptedException
- final void wait(long timeout) throws InterruptedException
Process
Methods
- Process()
- abstract void destroy()
- abstract int exitValue()
- abstract InputStream getErrorStream()
- abstract InputStream getInputStream()
- abstract OutputStream getOutputStream()
- abstract int waitFor() throws InterruptedException
Runtime
Methods
- Process exec(String cmdarray[], String envp[]) throws IOException
- Process exec(String cmdarray[]) throws IOException
- Process exec(String command, String envp[]) throws IOException
- Process exec(String command) throws IOException
- void exit(int status)
- long freeMemory()
- void gc()
- InputStream getLocalizedInputStream(InputStream in)
- OutputStream getLocalizedOutputStream(OutputStream out)
- static Runtime getRuntime()
- synchronized void load(String filename)
- synchronized void loadLibrary(String libname)
- void runFinalization()
- long totalMemory()
- void traceInstructions(boolean on)
- void traceMethodCalls(boolean on)
abstract SecurityManager
Fields
- protected boolean inCheck
Methods
- protected SecurityManager()
- void checkAccept(String host, int port)
- void checkAccess(ThreadGroup g)
- void checkAccess(Thread g)
- void checkConnect(String host, int port, Object context)
- void checkConnect(String host, int port)
- void checkCreateClassLoader()
- void checkDelete(String file)
- void checkExec(String cmd)
- void checkExit(int status)
- void checkLink(String lib)
- void checkListen(int port)
- void checkPackageAccess(String pkg)
- void checkPackageDefinition(String pkg)
- void checkPropertiesAccess()
- void checkPropertyAccess(String key, String def)
- void checkPropertyAccess(String key)
- void checkRead(String file, Object context)
- void checkRead(String file)
- void checkRead(FileDescriptor fd)
- void checkSetFactory()
- boolean checkTopLevelWindow(Object window)
- void checkWrite(String file)
- void checkWrite(FileDescriptor fd)
- protected int classDepth(String name)
- protected int classLoaderDepth()
- protected ClassLoader currentClassLoader()
- protected Class[] getClassContext()
- boolean getInCheck()
- Object getSecurityContext()
- protected boolean inClass(String name)
- protected boolean inClassLoader()
String
Methods
- String()
- String(StringBuffer buffer)
- String(byte ascii[], int hibyte)
- String(byte ascii[], int hibyte, int offset, int count)
- String(char value[], int offset, int count)
- String(char value[])
- String(String value)
- char charAt(int index)
- int compareTo(String anotherString)
- boolean equals(Object anObject)
- boolean equalsIgnoreCase(String anotherString)
- void getBytes(int srcBegin, int srcEnd, byte dst[], int dstBegin)
- void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin)
- int length()
- boolean regionMatches(boolean ignoreCase, int toffset, String
other, int offset, int len)
- boolean regionMatches(int toffset, String other, int offset,
int len)
- String concat(String str)
- static String copyValueOf(char data[])
- static String copyValueOf(char data[], int offset, int count)
- boolean endsWith(String suffix)
- int hashCode()
- int indexOf(String str, int fromIndex)
- int indexOf(String str)
- int indexOf(int ch, int fromIndex)
- int indexOf(int ch)
- String intern()
- int lastIndexOf(String str, int fromIndex)
- int lastIndexOf(String str)
- int lastIndexOf(int ch, int fromIndex)
- int lastIndexOf(int ch)
- String replace(char oldChar, char newChar)
- boolean startsWith(String prefix)
- boolean startsWith(String prefix, int toffset)
- String substring(int beginIndex, int endIndex)
- String substring(int beginIndex)
- char[] toCharArray()
- String toLowerCase()
- String toString()
- String toUpperCase()
- String trim()
- static String valueOf(double d)
- static String valueOf(float f)
- static String valueOf(long l)
- static String valueOf(int i)
- static String valueOf(char c)
- static String valueOf(boolean b)
- static String valueOf(char data[], int offset, int count)
- static String valueOf(char data[])
- static String valueOf(Object obj)
StringBuffer
Methods
- StringBuffer(String str)
- StringBuffer(int length)
- StringBuffer()
- int capacity()
- synchronized char charAt(int index)
- synchronized void ensureCapacity(int minimumCapacity)
- synchronized void getChars(int srcBegin, int srcEnd,
char dst[], int dstBegiint length()
- synchronized void setLength(int newLength)
- StringBuffer append(double d)
- StringBuffer append(float f)
- StringBuffer append(long l)
- StringBuffer append(int i)
- synchronized StringBuffer append(char c)
- StringBuffer append(boolean b)
- synchronized StringBuffer append(char str[], int offset,
int len)
- synchronized StringBuffer append(char str[])
- synchronized StringBuffer append(String str)
- synchronized StringBuffer append(Object obj)
- StringBuffer insert(int offset, double d)
- StringBuffer insert(int offset, float f)
- StringBuffer insert(int offset, long l)
- StringBuffer insert(int offset, int i)
- synchronized StringBuffer insert(int offset, char c)
- StringBuffer insert(int offset, boolean b)
- synchronized StringBuffer insert(int offset, char str[])
- synchronized StringBuffer insert(int offset, Object obj)
- synchronized StringBuffer insert(int offset, String str)
- synchronized void setCharAt(int index, char ch)
- String toString()
System
Fields
- static PrintStream err
- static InputStream in
- static PrintStream out
Methods
- static void arraycopy(Object src, int src_position, Object dst,
int dst_posistion, int length)
- static SecurityManager getSecurityManager()
- static void setSecurityManager(SecurityManager s)
- static void exit(int status)
- static void gc()
- static String getenv(String name)
- static Properties getProperties()
- static String getProperty(String key, String def)
- static String getProperty(String key)
- static void load(String filename)
- static void loadLibrary(String libname)
- static void runFinalization()
- static void setProperties(Properties props)
Thread implements Runnable
Fields
- final static int MAX_PRIORITY
- final static int MIN_PRIORITY
- final static int NORM_PRIORITY
Methods
- Thread()
- Thread(Runnable target)
- Thread(Runnable target, String name)
- Thread(ThreadGroup group, Runnable target)
- Thread(ThreadGroup group, Runnable target, String name)
- Thread(ThreadGroup group, String name)
- Thread(String name)
- static int activeCount()
- int countStackFrames()
- static Thread currentThread()
- void destroy()
- static int enumerate(Thread tarray[])
- final String getName()
- final int getPriority()
- final ThreadGroup getThreadGroup()
- void interrupt()
- static boolean interrupted()
- boolean isInterrupted()
- final synchronized void join(long millis, int nanos)
throws InterruptedException
- final synchronized void join(long millis) throws InterruptedException
- final void resume()
- void run()
- final void setName(String name)
- final void setPriority(int newPriority)
- static void sleep(long millis, int nanos) throws InterruptedException
- static void sleep(long millis) throws InterruptedException
- synchronized void start()
- final synchronized void stop(Throwable o)
- final void stop()
- final void suspend()
- static void yield()
- void checkAccess()
- static void dumpStack()
- final boolean isDaemon()
- final void join() throws InterruptedException
- final void setDaemon(boolean on)
- String toString()
ThreadGroup
- ThreadGroup(String name)
- ThreadGroup(ThreadGroup parent, String name)
- synchronized int activeCount()
- synchronized int activeGroupCount()
- final void checkAccess()
- final synchronized void destroy()
- int enumerate(ThreadGroup list[], boolean recurse)
- int enumerate(ThreadGroup list[])
- int enumerate(Thread list[], boolean recurse)
- int enumerate(Thread list[])
- final int getMaxPriority()
- final String getName()
- final ThreadGroup getParent()
- final boolean isDaemon()
- synchronized void list()
- final boolean parentOf(ThreadGroup g)
- final synchronized void resume()
- final void setDaemon(boolean daemon)
- final synchronized void setMaxPriority(int pri)
- final synchronized void stop()
- final synchronized void suspend()
- String toString()
- void uncaughtException(Thread t, Throwable e)
Throwable
Methods
- Throwable()
- Throwable(String message)
- Throwable fillInStackTrace()
- String getMessage()
- void printStackTrace(PrintStream s)
- void printStackTrace()
- String toString()
Interfaces
Cloneable
Runnable
Methods
java.net
Inasmuch as Java is a networked-based language, this comparatively small
package is very useful. Most importantly, it provides you with the ability
to communicate with other sources of information - by creating or connecting
to sockets or making use of URLs.
Classes
abstract ContentHandler
Methods
- ContentHandler()
- abstract Object getContent(URLConnection urlc) throws
IOException
DatagramPacket
Methods
- DatagramPacket(byte ibuf[], int ilength)
- DatagramPacket(byte ibuf[],int ilength, InetAddress iaddr, int
iport)
- InetAddress getAddress()
- byte[] getData()
- int getLength()
- int getPort()
DatagramSocket
Methods
- DatagramSocket(int port) throws SocketException
- DatagramSocket() throws SocketException
- protected synchronized void finalize()
- int getLocalPort()
- synchronized void receive(DatagramPacket p) throws IOException
- void send(DatagramPacket p) throws IOException
final InetAddress
Methods
- static synchronized InetAddress[] getAllByName(String
host) throws UnknownHostException
- static InetAddress getLocalHost() throws UnknownHostException
- boolean equals(Object obj)
- byte[] getAddress()
- static synchronized InetAddress getByName(String host)
throws UnknownHostExction
- String getHostName()
- int hashCode()
- String toString()
ServerSocket
Methods
- ServerSocket(int port) throws IOException
- ServerSocket(int port, int count) throws IOException
- Socket accept() throws IOException
- void close() throws IOException
- InetAddress getInetAddress()
- int getLocalPort()
- String toString()
- static synchronized void setSocketFactory(SocketImplFactory
fac) throws IOException
Socket
Methods
- Socket(InetAddress address, int port, boolean stream) throws
IOException
- Socket(InetAddress address, int port) throws IOException
- Socket(String host, int port, boolean stream) throws IOException
- Socket(String host, int port) throws UnknownHostException, IOException
- synchronized void close() throws IOException
- InetAddress getInetAddress()
- InputStream getInputStream() throws IOException
- int getLocalPort()
- OutputStream getOutputStream() throws IOException
- int getPort()
- static synchronized void setSocketImplFactory(SocketImplFactory
fac) throws IOException
- String toString()
abstract SocketImpl
Fields
- protected InetAddress address
- protected FileDescriptor fd
- protected int localport
- protected int port
Methods
- SocketImpl()
- protected abstract void accept(SocketImpl s) throws
IOException
- protected abstract int available() throws IOException
- protected abstract void bind(InetAddress host,
int port) throws IOException
- protected abstract void close() throws IOException
- protected abstract void connect(InetAddress address,
int port) throws IOException
- protected abstract void connect(String host, int
port) throws IOException
- protected abstract void create(boolean stream)
throws IOException
- FileDescriptor getFileDescriptor()
- protected InetAddress getInetAddress()
- protected abstract InputStream getInputStream()
throws IOException
- protected int getLocalPort()
- protected abstract OutputStream getOutputStream()
throws IOException
- protected int getPort()
- protected abstract void listen(int count) throws
IOException
- String toString()
URL
- URL(String protocol, String host, int port, String file) throws
MalformedURLException
- URL(URL context, String spec) throws MalformedURLException
- URL(String spec) throws MalformedURLException
- URL(String protocol, String host, String file) throws MalformedURLException
- int getPort()
- String getProtocol()
- boolean equals(Object obj)
- final Object getContent() throws IOException
- String getFile()
- String getHost()
- String getRef()
- int hashCode()
- URLConnection openConnection() throws IOException
- final InputStream openStream() throws IOException
- boolean sameFile(URL other)
- protected void set(String protocol, String host, int
port, String file, String ref)
- static synchronized void setURLStreamHandlerFactory(URLStreamHandlerFactory
fac)
- String toExternalForm()
- String toString()
abstract URLConnection
Fields
- protected boolean allowUserInteraction
- protected boolean connected
- protected boolean doInput
- protected boolean doOutput
- protected long ifModifiedSince
- protected URL url
- protected boolean useCaches
Methods
- abstract void connect() throws IOException
- boolean getAllowUserInteraction()
- Object getContent() throws IOException
- String getContentEncoding()
- int getContentLength()
- String getContentType()
- long getDate()
- boolean getDoInput()
- boolean getDoOutput()
- long getExpiration()
- String getHeaderField(int num)
- String getHeaderField(String name)
- long getHeaderFieldDate(String name, long Default)
- int getHeaderFieldInt(String name, int Default)
- String getHeaderFieldKey(int num)
- InputStream getInputStream() throws IOException
- long getLastModified()
- OutputStream getOutputStream() throws IOException
- URL getURL()
- void setAllowUserInteraction(boolean allowuserinteraction)
- static void setDefaultAllowUserInteraction(boolean default)
- void setDoInput(boolean doinput)
- void setDoOutput(boolean dooutput)
- String toString()
- URLConnection(URL url)
- static boolean getDefaultAllowUserInteraction()
- static String getDefaultRequestProperty(String key)
- boolean getDefaultUseCaches()
- long getIfModifiedSince()
- String getRequestProperty(String key)
- boolean getUseCaches()
- static synchronized void setContentHandlerFactory(ContentHandlerFactory
fac)
- static void setDefaultRequestProperty(String key, String value)
- void setDefaultUseCaches(boolean defaultusecaches)
- void setIfModifiedSince(long ifmodifiedsince)
- void setRequestProperty(String key, String value)
- void setUseCaches(boolean usecaches)
- static String guessContentTypeFromName(String fname)
- static String guessContentTypeFromStream(InputStream is) throws
IOException
URLEncoder
Methods
- static String encode(String s)
abstract URLStreamHandler
Methods
- URLStreamHandler()
- abstract URLConnection openConnection(URL url) throws
IOException
- void parseURL(URL url, String spec, int start, int limit)
- void setURL(URL url, String protocol, String host, int port,
String file, String ref)
- String toExternalForm(URL url)
Interfaces
ContentHandlerFactory
Methods
- abstract ContentHandler createContentHandler(String mimetype)
SocketImplFactory
- abstract SocketImpl createSocketImpl()
URLStreamHandlerFactory
Methods
- abstract URLStreamHandler CreateURLStreamHandler(String
protocol)
java.util
This package is esentially a smorgasbord of useful classes that did
not truly fit in any of the other packages. Among these handy classes are
the Date class, designed to manage and handle operations with
dates; the Hashtable class; and classes to develop ADTs such as
Stack and Vector.
Classes
BitSet implements java.lang.Cloneable
Methods
- BitSet()
- BitSet(int nbits)
- void and(BitSet set)
- void clear(int bit)
- Object clone()
- boolean equals(Object obj)
- boolean get(int bit)
- int hashCode()
- void or(BitSet set)
- void set(int bit)
- int size()
- String toString()
- void xor(BitSet set)
Date
Methods
- Date()
- Date(int year, int month, int date)
- Date(int year, int month, int date, int hrs, int min)
- Date(String s)
- Date(int year, int month, int date, int hrs, int min, int sec)
- boolean after(Date when)
- boolean before(Date when)
- boolean equals(Object obj)
- int getDate()
- int getDay()
- int getHours()
- int getMinutes()
- int getMonth()
- int getSeconds()
- long getTime()
- int getTimezoneOffset()
- int getYear()
- int hashCode()
- static long parse(String s)
- void setDate(int date)
- void setHours(int hours)
- void setMinutes(int minutes)
- void setMonth(int month)
- void setSeconds(int seconds)
- void setTime(long time)
- void setYear(int year)
- String toGMTString()
- String toLocaleString()
- String toString()
- static long UTC(int year, int month, int date, int hrs, int
min, int sec)
abstract Dictionary
- Dictionary()
- abstract Enumeration elements()
- abstract Object get(Object key)
- abstract boolean isEmpty()
- abstract Enumeration keys()
- abstract Object put(Object key, Object value)
- abstract Object remove(Object key)
- abstract int size()
Hashtable extends Dictionary implements java.lang.Cloneable
- Hashtable()
- Hashtable(int initialCapacity)
- Hashtable(int initialCapacity, float loadFactor)
- synchronized void clear()
- synchronized Object clone()
- synchronized boolean contains(Object value)
- synchronized boolean containsKey(Object key)
- synchronized Enumeration elements()
- synchronized Object get(Object key)
- boolean isEmpty()
- synchronized Enumeration keys()
- synchronized Object put(Object key, Object value)
- protected void rehash()
- synchronized Object remove(Object key)
- int size()
- synchronized String toString()
Observable
- Observable()
- synchronized void addObserver(Observer o)
- protected synchronized void clearChanged()
- synchronized int countObservers()
- synchronized void deleteObserver(Observer o)
- synchronized void deleteObservers()
- synchronized boolean hasChanged()
- synchronized void notifyObservers(Object arg)
- void notifyObservers()
- protected synchronized void setChanged()
Properties extends Hashtable
Fields
- protected Properties defaults
Methods
- Properties()
- Properties(Properties defaults)
- String getProperty(String key, String defaultValue)
- String getProperty(String key)
- void list(PrintStream out)
- synchronized void load(InputStream in) throws IOException
- Enumeration propertyNames()
- synchronized void save(OutputStream out, String header)
Random
- Random()
- Random(long seed)
- double nextDouble()
- float nextFloat()
- synchronized double nextGaussian()
- int nextInt()
- long nextLong()
- synchronized void setSeed(long seed)
Stack extends Vector
- Stack()
- boolean empty()
- Object peek()
- Object pop()
- Object push(Object item)
- int search(Object o)
StringTokenizer implements Enumeration
- StringTokenizer(String str)
- StringTokenizer(String str, String delim)
- StringTokenizer(String str, String delim, boolean returnTokens)
- int countTokens()
- boolean hasMoreElements()
- boolean hasMoreTokens()
- Object nextElement()
- String nextToken(String delim)
- String nextToken()
Vector implements java.lang.Cloneable
Fields
- protected int elementCount
- protected Object elementData[]
Methods
- Vector()
- Vector(int initialCapacity)
- Vector(int initialCapacity, int capacityIncrement)
- final synchronized void addElement(Object obj)
- final int capacity()
- protected int capacityIncrement
- synchronized Object clone()
- final boolean contains(Object elem)
- final synchronized void copyInto(Object anArray[])
- final synchronized Object elementAt(int index)
- final synchronized Enumeration elements()
- final synchronized void ensureCapacity(int minCapacity)
- final synchronized Object firstElement()
- final synchronized int indexOf(Object elem, int index)
- final int indexOf(Object elem)
- final synchronized void insertElementAt(Object obj, int
index)
- final boolean isEmpty()
- final synchronized Object lastElement()
- final synchronized int lastIndexOf(Object elem, int index)
- final int lastIndexOf(Object elem)
- final synchronized void removeAllElements()
- final synchronized boolean removeElement(Object obj)
- final synchronized void removeElementAt(int index)
- final synchronized void setElementAt(Object obj, int
index)
- final synchronized void setSize(int newSize)
- final int size()
- final synchronized String toString()
- final synchronized void trimToSize()
Interfaces
Enumeration
Methods
- abstract boolean hasMoreElements()
- abstract Object nextElement()
Observer
- abstract void update(Observable o, Object arg)
sun.tools.debug
The sun.tools.debug package is designed to provide for remote debugging
with the Java Debugger (JDB). Examining these classes will provide you
with some understand of this process. While normal code will have no need
to make use of this package, this package provides you with the ground-work
on which you may build a more useful and user-friendly debugger - something
the Sun openly encourages.
Classes
RemoteArray extends RemoteObject
Methods
- String arrayTypeName(int type)
- final RemoteValue getElement(int index) throws Exception
- final RemoteValue[] getElements(int beginIndex, int endIndex) throws
Exception
- final RemoteValue[] getElements() throws Exception
- final int getElementType() throws Exception
- final int getSize()
- String typeName()
- String description()
- String toString()
RemoteBoolean extends RemoteValue
Methods
- boolean get()
- String toString()
- String typeName()
RemoteByte extends RemoteValue
Methods
- byte get()
- String toString()
- String typeName()
RemoteChar extends RemoteValue
Methods
- char get()
- String toString()
- String typeName()
RemoteClass extends RemoteObject
Methods
- void catchExceptions() throws Exception
- String clearBreakpoint(int pc) throws Exception
- String clearBreakpointLine(int lineno) throws Exception
- String clearBreakpointMethod(RemoteField method) throws Exception
- String description()
- RemoteObject getClassLoader() throws Exception
- RemoteField getField(String name) throws Exception
- RemoteField getField(int num) throws Exception
- RemoteField[] getFields() throws Exception
- RemoteValue getFieldValue(String name) throws Exception
- RemoteValue getFieldValue(int num) throws Exception
- RemoteField getInstanceField(int num) throws Exception
- RemoteField[] getInstanceFields() throws Exception
- RemoteClass[] getInterfaces() throws Exception
- RemoteField getMethod(String name) throws Exception
- String[] getMethodNames() throws Exception
- RemoteField[] getMethods() throws Exception
- String getName() throws Exception
- InputStream getSourceFile() throws Exception
- String getSourceFileName()
- RemoteField[] getStaticFields() throws Exception
- RemoteClass getSuperclass() throws Exception
- void ignoreExceptions() throws Exception
- boolean isInterface() throws Exception
- String setBreakpointLine(int lineno) throws Exception
- String setBreakpointMethod(RemoteField method) throws Exception
- String toString()
- String typeName() throws Exception
RemoteDebugger
Methods
- RemoteDebugger(String host, String password, DebuggerCallback client,
boolean verbose) throws Exception
- RemoteDebugger(String javaArgs, DebuggerCallback client, boolean verbose)
throws Exception
- void close()
- RemoteClass findClass(String name) throws Exception
- int freeMemory() throws Exception
- void gc(RemoteObject save_list[]) throws Exception
- RemoteObject get(Integer id)
- String[] getExceptionCatchList() throws Exception
- String getSourcePath() throws Exception
- void itrace(boolean traceOn) throws Exception
- String[] listBreakpoints() throws Exception
- RemoteClass[] listClasses() throws Exception
- RemoteThreadGroup[] listThreadGroups(RemoteThreadGroup tg) throws Exception
- RemoteThreadGroup run(int argc, String argv[]) throws Exception
- void setSourcePath(String pathList) throws Exception
- int totalMemory() throws Exception
- void trace(boolean traceOn) throws Exception
RemoteDouble extends RemoteValue
Methods
- double get()
- String toString()
- String typeName()
RemoteField extends Field
Methods
- String getModifiers()
- String getName()
- String getType()
- boolean isStatic()
- String toString()
RemoteFloat extends RemoteValue
Methods
- float get()
- String toString()
- String typeName()
RemoteInt extends RemoteValue
Methods
- int get()
- RemoteInt(int i)
- String toString()
- String typeName()
RemoteLong extends RemoteValue
Methods
- long get()
- String toString()
- String typeName()
RemoteObject extends RemoteValue
Methods
- String description()
- final RemoteClass getClazz()
- RemoteField getField(String name) throws Exception
- RemoteField getField(int num) throws Exception
- RemoteField[] getFields() throws Exception
- RemoteValue getFieldValue(String name) throws Exception
- RemoteValue getFieldValue(int num) throws Exception
- final int getId()
- String toString()
- String typeName() throws Exception
RemoteShort extends RemoteValue
Methods
- short get()
- String toString()
- String typeName()
RemoteStackFrame extends StackFrame
Methods
- int getLineNumber()
- RemoteStackVariable getLocalVariable(String name) throws Exception
- RemoteStackVariable[] getLocalVariables() throws Exception
- String getMethodName()
- int getPC()
- RemoteClass getRemoteClass()
RemoteStackVariable extends LocalVariable
Methods
- String getName()
- RemoteValue getValue()
- boolean inScope()
RemoteString extends RemoteObject
Methods
- String description()
- String toString()
- String typeName()
- String typeName()
RemoteThread extends RemoteObject
Methods
- void cont() throws Exception
- void down(int nFrames) throws Exception
- RemoteStackFrame[] dumpStack() throws Exception
- RemoteStackFrame getCurrentFrame() throws Exception
- int getCurrentFrameIndex()
- String getName() throws Exception
- RemoteStackVariable getStackVariable(String name) throws Exception
- RemoteStackVariable[] getStackVariables() throws Exception
- String getStatus() throws Exception
- boolean isSuspended()
- void next() throws Exception
- void resetCurrentFrameIndex()
- void resume() throws Exception
- void setCurrentFrameIndex(int iFrame)
- void step(boolean skipLine) throws Exception
- void stop() throws Exception
- void suspend() throws Exception
- void up(int nFrames) throws Exception
RemoteThreadGroup extends RemoteObject
Methods
- String getName() throws Exception
- RemoteThread[] listThreads(boolean recurse) throws Exception
- void stop() throws Exception
RemoteValue
Methods
- String description()
- static int fromHex(String hexStr)
- final int getType()
- final boolean isObject()
- static String toHex(int num)
- abstract String typeName() throws Exception
StackFrame
Methods
- StackFrame()
- String toString()
LocalVariable
The sun.tools.debug.LocalVariable class is not a public class, but rather
one restricted for use only within the sun.tools.debug package. This is
due to the fact that the class itself and all its fields are defined with
the "friendly" (no access modifiers specified). Although it is
not meant for use by the Java developer, it is nevertheless listed here
due to the dependence on this class by other classes in the package.
Fields
- boolean methodArgument;
- String name;
- String signature;
- int slot;
Interface
DebuggerCallback
- abstract void breakpointEvent(RemoteThread t)
- abstract void exceptionEvent(RemoteThread t, String errorText)
throws Exception
- abstract void printToConsole(String text) throws Exception
- abstract void quitEvent() throws Exception
- abstract void threadDeathEvent(RemoteThread t) throws Exception
Exceptions
Exceptions provide you with a means of managing the ordinary run-time
problems that may be encountered during execution of your program. Exceptions
are thrown by methods and are handled with try-catch blocks.
All exceptions are derived from the java.lang.Exception class
and most consist only of two constructor methods. Consequently, only the
constructor methods for the java.lang.Exception class are listed
here. Unless otherwise noted, all exceptions may be created with no paramters
or with a descriptive string as a paramter.
java.awt
AWTException
- AWTException(String message)
java.io
EOFException extends IOException
FileNotFoundException extends IOException
IOException extends java.lang.Exception
InterruptedIOException extends IOException
UTFDataFormatException extends IOException
java.lang
ArithmeticException extends RuntimeException
ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException
Constructors
- ArrayIndexOutOfBoundsException()
- ArrayIndexOutOfBoundsException(int invalid_index)
- ArrayIndexOutOfBoundsException(String message)
ArrayStoreException extends RuntimeException
ClassCastException extends RuntimeException
ClassNotFoundException extends Exception
CloneNotSupportedException extends Exception
Exception extends Throwable
Methods
- Exception(String mesage)
- Exception()
IllegalAccessException extends Exception
IllegalArgumentException extends RuntimeException
IllegalMonitorStateException extends RuntimeException
IllegalThreadStateException extends RuntimeException
IndexOutOfBoundsException extends RuntimeException
InstantiationException extends Exception
InterruptedException extends Exception
NegativeArraySizeException extends RuntimeException
NoSuchMethodException extends Exception
NullPointerException extends RuntimeException
NumberFormatException extends IllegalArgumentException
RuntimeException extends Exception
SecurityException extends RuntimeException
StringIndexOutOfBoundsException extends IndexOutOfBoundsException
Constructors
- StringIndexOutOfBoundsException()
- StringIndexOutOfBoundsException(int invalid_index)
- StringIndexOutOfBoundsException(String)
java.net
MalformedURLException extends java.lang.IOException
ProtocolException extends java.lang.IOException
SocketException extends java.lang.IOException
UnknownHostException extends java.lang.IOException
UnknownServiceException extends java.lang.IOException
java.util
EmptyStackException extends java.lang.RuntimeException
Constructors
NoSuchElementException extends java.lang.RuntimeException
Errors
While errors and exceptions are both based on the java.lang.Throwable
class, errors are designed to manage more critical run-time errors. Errors
may be handled in a similar manner to exceptions, but unless you clearly
understand the problem and have devised a suitable way of resolving it,
error-handling is not something that should be used in your code.
Similar to exceptions, all errors are derived from java.lang.Error.
Most errors contain only constructor methods and most contain only two
ErrorName() and ErrorName(String message). While all
errors are listed here, only those errors whose constructors do not conform
to the principle are listed here.
java.awt
AWTError extends java.lang.Error
Constructors
java.lang
AbstractMethodError extends IncompatibleClassChangeError
ClassCircularityError extends LinkageError
ClassFormatError extends LinkageError
Error extends Throwable
Methods
- Error(String mesage)
- Error()
IllegalAccessError extends IncompatibleClassChangeError
IncompatibleClassChangeError extends LinkageError
InstantiationError extends IncompatibleClassChangeError
InternalError extends VirtualMachineError
LinkageError extends Error
NoClassDefFoundError extends LinkageError
NoSuchFieldError extends IncompatibleClassChangeError
NoSuchMethodError extends IncompatibleClassChangeError
OutOfMemoryError extends VirtualMachineError
StackOverflowError extends VirtualMachineError
ThreadDeath extends Error
Constructors
UnknownError extends VirtualMachineError
UnsatisfiedLinkError extends LinkageError
VerifyError extends LinkageError
VirtualMachineError extends Error
QUE Home Page
For technical support for our books and software contact support@mcp.com
Copyright ©1996, Que Corporation