IT. Expert System.

Android Reference

ObjectInputStream.GetField


java.io

Class ObjectInputStream.GetField

  • Enclosing class:
    ObjectInputStream


    public abstract static class ObjectInputStream.GetField
    extends Object
    GetField is an inner class that provides access to the persistent fields read from the source stream.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      abstract boolean defaulted(String name)
      Indicates if the field identified by name is defaulted.
      abstract boolean get(String name, boolean defaultValue)
      Gets the value of the boolean field identified by name from the persistent field.
      abstract byte get(String name, byte defaultValue)
      Gets the value of the byte field identified by name from the persistent field.
      abstract char get(String name, char defaultValue)
      Gets the value of the character field identified by name from the persistent field.
      abstract double get(String name, double defaultValue)
      Gets the value of the double field identified by name from the persistent field.
      abstract float get(String name, float defaultValue)
      Gets the value of the float field identified by name from the persistent field.
      abstract int get(String name, int defaultValue)
      Gets the value of the integer field identified by name from the persistent field.
      abstract long get(String name, long defaultValue)
      Gets the value of the long field identified by name from the persistent field.
      abstract Object get(String name, Object defaultValue)
      Gets the value of the object field identified by name from the persistent field.
      abstract short get(String name, short defaultValue)
      Gets the value of the short field identified by name from the persistent field.
      abstract ObjectStreamClass getObjectStreamClass()
      Gets the ObjectStreamClass that describes a field.
    • Constructor Detail

      • ObjectInputStream.GetField

        public ObjectInputStream.GetField()
    • Method Detail

      • getObjectStreamClass

        public abstract ObjectStreamClass getObjectStreamClass()
        Gets the ObjectStreamClass that describes a field.
        Returns:
        the descriptor class for a serialized field.
      • defaulted

        public abstract boolean defaulted(String name)
                                   throws IOException,
                                          IllegalArgumentException
        Indicates if the field identified by name is defaulted. This means that it has no value in this stream.
        Parameters:
        name - the name of the field to check.
        Returns:
        true if the field is defaulted, false otherwise.
        Throws:
        IllegalArgumentException - if name does not identify a serializable field.
        IOException - if an error occurs while reading from the source input stream.
      • get

        public abstract boolean get(String name,
                  boolean defaultValue)
                             throws IOException,
                                    IllegalArgumentException
        Gets the value of the boolean field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not boolean.
      • get

        public abstract char get(String name,
               char defaultValue)
                          throws IOException,
                                 IllegalArgumentException
        Gets the value of the character field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not char.
      • get

        public abstract byte get(String name,
               byte defaultValue)
                          throws IOException,
                                 IllegalArgumentException
        Gets the value of the byte field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not byte.
      • get

        public abstract short get(String name,
                short defaultValue)
                           throws IOException,
                                  IllegalArgumentException
        Gets the value of the short field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not short.
      • get

        public abstract int get(String name,
              int defaultValue)
                         throws IOException,
                                IllegalArgumentException
        Gets the value of the integer field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not int.
      • get

        public abstract long get(String name,
               long defaultValue)
                          throws IOException,
                                 IllegalArgumentException
        Gets the value of the long field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not long.
      • get

        public abstract float get(String name,
                float defaultValue)
                           throws IOException,
                                  IllegalArgumentException
        Gets the value of the float field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by float is not char.
      • get

        public abstract double get(String name,
                 double defaultValue)
                            throws IOException,
                                   IllegalArgumentException
        Gets the value of the double field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not double.
      • get

        public abstract Object get(String name,
                 Object defaultValue)
                            throws IOException,
                                   IllegalArgumentException
        Gets the value of the object field identified by name from the persistent field.
        Parameters:
        name - the name of the field to get.
        defaultValue - the default value that is used if the field does not have a value when read from the source stream.
        Returns:
        the value of the field identified by name.
        Throws:
        IOException - if an error occurs while reading from the source input stream.
        IllegalArgumentException - if the type of the field identified by name is not Object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 677 / . Delta: 0.02570 с