java.rmi.UnexpectedException Java Examples

The following examples show how to use java.rmi.UnexpectedException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: Util.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #2
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ExceptionHandlerImpl.java    License: Apache License 2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #3
Source Project: TencentKona-8   Author: Tencent   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #4
Source Project: TencentKona-8   Author: Tencent   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #5
Source Project: jdk8u60   Author: chenghanpeng   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #6
Source Project: jdk8u60   Author: chenghanpeng   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #7
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: Util.java    License: MIT License 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #8
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ExceptionHandlerImpl.java    License: MIT License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #9
Source Project: demo-java   Author: saucelabs-training   File: FollowLinkTest.java    License: MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying link can be followed.
 *
 * @throws InvalidElementStateException
 */
@Test(dataProvider = "hardCodedBrowsers")
public void verifyLinkTest(String platformName,
                           String deviceName,
                           String platformVersion,
                           String appiumVersion,
                           String deviceOrientation,
                           Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    //create webdriver session
    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getAndroidDriver();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.followLink();

    Assert.assertFalse(page.isOnPage());
}
 
Example #10
Source Project: demo-java   Author: saucelabs-training   File: TextInputTest.java    License: MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying if the comment input is functional.
 * @throws InvalidElementStateException
 */
@org.testng.annotations.Test(dataProvider = "hardCodedBrowsers")
public void verifyCommentInputTest(String platformName,
                                   String deviceName,
                                   String platformVersion,
                                   String appiumVersion,
                                   String deviceOrientation,
                                   Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getAndroidDriver();

    String commentInputText = UUID.randomUUID().toString();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.submitComment(commentInputText);

    Assert.assertTrue(page.getSubmittedCommentText().contains(commentInputText));
}
 
Example #11
Source Project: demo-java   Author: saucelabs-training   File: FollowLinkTest.java    License: MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying link can be followed.
 *
 * @throws InvalidElementStateException
 */
@Test(dataProvider = "hardCodedBrowsers")
public void verifyLinkTest(String platformName,
                           String deviceName,
                           String platformVersion,
                           String appiumVersion,
                           String deviceOrientation,
                           Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    //create webdriver session
    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getiosDriver();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.followLink();

    Assert.assertFalse(page.isOnPage());
}
 
Example #12
Source Project: demo-java   Author: saucelabs-training   File: TextInputTest.java    License: MIT License 6 votes vote down vote up
/**
 * Runs a simple test verifying if the comment input is functional.
 * @throws InvalidElementStateException
 */
@org.testng.annotations.Test(dataProvider = "hardCodedBrowsers")
public void verifyCommentInputTest(String platformName,
                                   String deviceName,
                                   String platformVersion,
                                   String appiumVersion,
                                   String deviceOrientation,
                                   Method method)
        throws MalformedURLException, InvalidElementStateException, UnexpectedException {

    this.createDriver(platformName, deviceName, platformVersion, appiumVersion, deviceOrientation, method.getName());
    WebDriver driver = this.getiosDriver();

    String commentInputText = UUID.randomUUID().toString();

    GuineaPigPage page = new GuineaPigPage(driver);

    page.submitComment(commentInputText);

    Assert.assertTrue(page.getSubmittedCommentText().contains(commentInputText));
}
 
Example #13
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #14
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #15
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #16
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #17
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #18
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #19
Source Project: hottub   Author: dsrg-uoft   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #20
Source Project: hottub   Author: dsrg-uoft   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #21
Source Project: openjdk-8-source   Author: keerath   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #22
Source Project: openjdk-8-source   Author: keerath   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #23
@RabbitListener(queues = {"customer.update"})
public void updateCustomer(String message) throws InterruptedException, IOException {
    Profile profile = objectMapper.readValue(message, Profile.class);

    try {
        // Update the customer service for the profile
        UpdateCustomerResponse response =
                customerClient.updateCustomerResponse(profile);

        if (!response.isSuccess()) {
            String errorMsg =
                    String.format("Could not update customer from profile for %s",
                            profile.getUsername());
            log.error(errorMsg);
            throw new UnexpectedException(errorMsg);
        }
    } catch (Exception ex) {
        // Throw AMQP exception and redeliver the message
        throw new AmqpIllegalStateException("Customer service update failed", ex);
    }
}
 
Example #24
Source Project: openjdk-8   Author: bpupadhyaya   File: Util.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Wraps an exception thrown by an implementation
 * method.  It returns the corresponding client-side exception.
 * @param orig the exception to wrap.
 * @return the wrapped exception.
 */
public RemoteException wrapException(Throwable orig)
{
    if (orig instanceof SystemException) {
        return mapSystemException((SystemException)orig);
    }

    if (orig instanceof Error) {
        return new ServerError("Error occurred in server thread",(Error)orig);
    } else if (orig instanceof RemoteException) {
        return new ServerException("RemoteException occurred in server thread",
                                   (Exception)orig);
    } else if (orig instanceof RuntimeException) {
        throw (RuntimeException) orig;
    }

    if (orig instanceof Exception)
        return new UnexpectedException( orig.toString(), (Exception)orig );
    else
        return new UnexpectedException( orig.toString());
}
 
Example #25
Source Project: openjdk-8   Author: bpupadhyaya   File: ExceptionHandlerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example #26
Source Project: txtUML   Author: ELTE-Soft   File: Exporter.java    License: Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Populates model with the diagrams to be exported
 * 
 * @throws ModelMapException
 * @throws ArrangeException
 * @throws UnknownDiagramTypeException
 * @throws UnexpectedEndException
 */
private void createModel() throws ModelMapException, ArrangeException, UnexpectedDiagramTypeException,
		UnexpectedEndException, UnexpectedException {

	for (Pair<String, DiagramExportationReport> report : layout.getReportsWithDiagramNames()) {
		String name = report.getFirst();
		DiagramExportationReport der = report.getSecond();

		// map connects the layout information to the EMF-UML model
		// informations
		ModelMapProvider map = new ModelMapProvider(URI.createFileURI(genFolder), der.getModelName());

		model.createDiagram(name, report.getSecond(), map);

	}

}
 
Example #27
Source Project: varsim   Author: bioinform   File: VCFInfo.java    License: BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * parse INFO field string
 * store each key value pair in a map
 * @param infoString
 */
public VCFInfo(final String infoString) throws UnexpectedException {
    this.info2Value = new HashMap<String, VCFInfoElement>();
    StringTokenizer infos = new StringTokenizer(infoString, ";");
    while (infos.hasMoreTokens()) {
        String i = infos.nextToken();
        StringTokenizer keyAndValue = new StringTokenizer(i, "=");
        String key = keyAndValue.nextToken();
        if (keyAndValue.hasMoreTokens()) {
            String value = keyAndValue.nextToken();
            this.info2Value.put(key, new VCFInfoElement(key, value));
        } else {
            //must be boolean or flag
            this.info2Value.put(key, new VCFInfoElement(Boolean.class));
        }
    }
}
 
Example #28
Source Project: varsim   Author: bioinform   File: VCFInfo.java    License: BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * parse comma separated value and store it
 * in proper types
 * @param id
 * @param vcfIdValue
 */
public VCFInfoElement(final String id, String vcfIdValue) throws UnexpectedException {
    this.type = getType(id);
    String[] valueArray = StringUtilities.fastSplit(vcfIdValue, ",");
    if (type == int[].class) {
        int[] nums = new int[valueArray.length];
        for (int i = 0; i < nums.length; i++) {
            nums[i] = StringUtilities.parseInt(valueArray[i]);
        }
        this.value = type.cast(nums);
    } else if (type == String[].class) {
            this.value = type.cast(valueArray);
    } else {
        throw new UnexpectedException("ERROR: only Integer and String supported for INFO field (" + id + ").");
    }
}
 
Example #29
Source Project: varsim   Author: bioinform   File: VCFparserTest.java    License: BSD 2-Clause "Simplified" License 6 votes vote down vote up
@Before
public void setup() throws UnexpectedException{
    parser = new VCFparser();
    parser.processLine("##fileformat=VCFv4.1");
    parser.processLine("##reference=src/test/resources/DuplicationTest/oneDuplicationTest.fa");
    parser.processLine("##INFO=<ID=SVLEN,Number=.,Type=Integer,Description=\"Length of variant\">");
    parser.processLine("##INFO=<ID=SVTYPE,Number=1,Type=String,Description=\"Type of structural variant\">");
    parser.processLine("##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotype\">");
    parser.processLine("##ALT=<ID=DEL,Description=\"Deletion\">");
    parser.processLine("##ALT=<ID=DEL:ME:ALU,Description=\"Deletion of ALU element\">");
    parser.processLine("##ALT=<ID=DEL:ME:L1,Description=\"Deletion of L1 element\">");
    parser.processLine("##ALT=<ID=DUP,Description=\"Duplication\">");
    parser.processLine("##ALT=<ID=DUP:TANDEM,Description=\"Tandem Duplication\">");
    parser.processLine("##ALT=<ID=INS,Description=\"Insertion of novel sequence\">");
    parser.processLine("##ALT=<ID=INS:ME:ALU,Description=\"Insertion of ALU element\">");
    parser.processLine("##ALT=<ID=INS:ME:L1,Description=\"Insertion of L1 element\">");
    parser.processLine("##ALT=<ID=INV,Description=\"Inversion\">");
    parser.processLine("##ALT=<ID=CNV,Description=\"Copy number variable region\">");
    parser.processLine("##ALT=<ID=ITX,Description=\"Intra-chromosomal translocation\">");
    parser.processLine("##ALT=<ID=CTX,Description=\"Inter-chromosomal translocation\">");
    parser.processLine("#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	test");
}
 
Example #30
Source Project: aegisthus   Author: Netflix   File: AegisthusLoadCaster.java    License: Apache License 2.0 6 votes vote down vote up
private long getNumber(byte[] arg0) throws Exception {
	byte[] by = hex.decode(arg0);
	ByteBuffer bb = ByteBuffer.allocate(by.length);
	bb.put(by);
	bb.position(0);
	switch(by.length) {
	case 1:
		return (long)bb.get();
	case 2:
		return (long)bb.getShort();
	case 4:
		return (long)bb.getInt();
	case 8:
		return (long)bb.getLong();
	}
	throw new UnexpectedException("couldn't determine datatype");
}