Package bm.net

Examples of bm.net.NetException


                }
            }
        }
        if( lastException != null )
        {
            throw new NetException( Net.ERR_RC_INVOKATION, lastException );
        }
        else
        {
            return retval;
        }
View Full Code Here


            // header, making virtual name server hosting to fail
            connection.setRequestProperty( "Host", connection.getHost() );
        }
        catch( IOException e )
        {
            throw new NetException( Net.ERR_HTTP_OPEN, e );
        }
    }
View Full Code Here

            }
        }
        catch( IOException e )
        {
            log.error( e );
            throw new NetException( Net.ERR_HTTP_GET, e );
        }
    }
View Full Code Here

            out = connection.openDataOutputStream();
            return out;
        }
        catch( IOException e )
        {
            throw new NetException( Net.ERR_HTTP_BEGIN_POST, e );
        }
    }
View Full Code Here

            // Any 500 status number (500, 501) means there was a server error
            if( responseCode >= 500 )
            {
                log.error( "Server returned error code: " + responseCode + " " + responseMessage );
                throw new NetException( Net.ERR_HTTP_SERVER );
            }
            else if( responseCode != HttpConnection.HTTP_OK )
            {
                log.debug( "Server returned unhandled code: " + responseCode + " " + responseMessage );
                // ShouldDo: handle redirects?
                throw new NetException( Net.ERR_HTTP_UNHANDLED );
            }
            else
            {
                contentType = connection.getType();
                contentLength = (int) connection.getLength();
                log.debug( "content-type: " + contentType + ", content-length: " + contentLength );
            }
            in = new NetInputStream( this, connection.openDataInputStream() );
            return in;
        }
        catch( IOException e )
        {
            throw new NetException( Net.ERR_HTTP_IO, e );
        }
    }
View Full Code Here

TOP

Related Classes of bm.net.NetException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.