Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2011 Red Hat, Inc. (jdcasey@commonjava.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package org.commonjava.aprox.client.core.helper;
public class PathInfo
    private final boolean exists;
    private final String contentType;
    private final long contentLength;
    private final Date lastModified;
    public PathInfofinal Map<StringStringheaders )
    {
        if ( headers == null )
        {
             = false;
             = null;
             = -1;
             = null;
        }
        else
        {
             = true;
            
             = headers.get"content-type" );
            
            final String cl = headers.get("content-length");
             = cl == null ? -1 : Long.parseLongcl );
            
            final String lm = headers.get"last-modified" );
            Date lastModified;
            try
            {
                lastModified = lm == null ? null : HttpUtils.parseDateHeaderlm );
            }
            catch ( final ParseException e )
            {
                lastModified = null;
            }
            this. = lastModified;
        }
    }
    public boolean exists()
    {
        return ;
    }
    public String getContentType()
    {
        return ;
    }
    public long getContentLength()
    {
        return ;
    }
    public Date getLastModified()
    {
        return ;
    }
    @Override
    public String toString()
    {
        return String.format"PathInfo [exists=%s, contentType=%s, contentLength=%s, lastModified=%s]",
                               );
    }
New to GrepCode? Check out our FAQ X